You are downloading the file itself, however it is base64 encoded.
Are you simply decoding it and reading it in to your script?
keep i mind that it is not base64 encoded TEXT which can simply be decoded and read as is
it is a file which means there is other metadata encoded in there as well.
You might be doing this
https://base64.guru/converter/decode/textWhen you should be doing this
https://base64.guru/converter/decode/fileI have a working python solution but i am not familiar with poweshell. you can try the solution found here to write to a file
https://stackoverflow.com/questions/35334928/convert-base64-string-to-fileand then open the file to ensure it matches exactly.
------------------------------
Simon H
------------------------------
Original Message:
Sent: 07-06-2022 11:14
From: Hemanth H.
Subject: How to download File attachments using API ?
I am using PowerShell. The file is a AES KEY, used to encrypt confidential data. When I convert from Base64, it seems to be adding some extra characters at the beginning.
Is there a way to download the file itself, rather than getting the data in Base64 format ?
------------------------------
Hemanth H.
Original Message:
Sent: 07-06-2022 09:57
From: Simon H
Subject: How to download File attachments using API ?
You need to decode the base64 into a byte string and write it to a file i am not sure what language you are using but in python it would look something like this
dl_file = //get you file from quickbase//assuming the file is a png imageimport base64with open("img.png", "wb") as fh: fh.write(base64.decodebytes(dl_file))
------------------------------
Simon H
Original Message:
Sent: 07-06-2022 07:15
From: Hemanth H.
Subject: How to download File attachments using API ?
I am trying to download the files from my Quickbase table using the download file API (https://developer.quickbase.com/operation/downloadFile), but I only get the data in base64 format. How do I download the file itself ?
------------------------------
Hemanth
------------------------------