I'm calling an S3 Bucket requesting a .ICO file. T...
# suitescript
n
I'm calling an S3 Bucket requesting a .ICO file. The content returned looks garbage (not the usual base64 encoded stream) and trying to create a file in the filecabinet causes an unexpected error. If I navigate to the URL with the browser it correctly displays the icon. It's working fine for other file types including PNG's, it's just failing with ICO's. I cannot help wonder if I need to set something (maybe Accept?) in the header on the https.get request. Any idea what I might be able to try or what would be causing the issue please?
c
base64 encoding is how you transfer that kind of stuff. It would just be text in the header as far as I know.
n
Sure I just wondered if, for this file type I'd need to specify something in the header of the GET for the bucket to send me what I'd expect, a base 64 encoded representation of the binary content.
b
N/https uses base 64 for content types that it recognizes as a binary type
unknown content types, which is probably what you are getting, are assumed to be utf-8, and the content is decoded as such
this will destroy the file contents if its not actually utf-8