I have an instance where I would need to upload a file attachment through an API connection but they require it to be in Base64 file content format instead. Is there already a method built into Wappler to handle this?
So the workflow would be user uploads file(s) to server, Server action would convert file(s) to a Base64 format, then run the API Post array of Base64 formatted file(s).
I had seen a few older forum posts asking the same but did not see a solution.
Got some time to test it out this morning and it works great. I used the create a list to add the columns the API requires like file name and base64 content, then within the repeat of the file upload used the File to Base 64 extension and added its output to the list along with the filename from the repeat.
Get the value of the attachments list, add it to the JSON for the API and works just fine.