Send file to external service in base64 format

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

  1. // MBL_File was uploaded to the form. I also tried without encoding it
  2. file_content = zoho.encryption.base64Encode(input.MBL_File.content);
  3. 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.