Send file to external service in base64 format
Hi,
I need to send an uploaded file to my Zoho Creator app to an external service. But my file is unreadable at destination.
I'm trying the following code
- // MBL_File was uploaded to the form. I also tried without encoding it
- file_content = zoho.encryption.base64Encode(input.MBL_File.content);
- file_info = Map();
file_info.put("file_name",input.MBL + "_" + input.ID + ".pdf");
file_info.put("file_content",file_content);
// Se envĂa el archivo al Parser
resp = invokeurl
[
url :api_url
type :POST
parameters:file_info
headers:header
];
The request is correct (status 200) but, as I said, the file is unreadable. What I'm missing?
I'll appreciate your help.