When using N/https to pull a file from AWS and storing the file in the file cabinet there is a data encoding mismatch with excel files. Can anyone provide some guidance on how to identify the encoding of the excel file so that I can convert it into a base64 string?
lukeabbott
07/06/2023, 2:51 PM
I have no issues saving image files, text files, etc. It is just xlsx files that are getting corrupted.
c
CD
07/06/2023, 3:08 PM
.xlsx are binary (they’re actually a .zip file under the covers)
l
lukeabbott
07/06/2023, 3:11 PM
So I should be looking to use something like btoa.
b
battk
07/06/2023, 4:45 PM
your approach is doomed if you arent receiving a base 64 encoded string back from N/https
👍 1
💯 1
battk
07/06/2023, 4:46 PM
if you are receiving plaintext, it means N/https decided that the content wasnt binary and it tried to encode it a utf-8
battk
07/06/2023, 4:46 PM
the encoding errors from doing so will destroy your file
l
lukeabbott
07/06/2023, 5:12 PM
ahh, so you're thinking it's already corrupted before I've even tried to touch it.