PDF Files getting corrupted while uploading File via Form Data in Logic Apps

Sritharan, Raghuraman 0 Reputation points
2024-11-17T16:17:27.8833333+00:00

Hi Team,

Tried implementing Form Data using HTTP connector in Logic to upload PDF File, File is getting upload but PDF is corrupted in the target side.

  1. Tried converting base 64 data using Base64toBinary Function
  2. Tried directly reading file content using Blob

PDF is getting uploaded while testing using postman. Any suggestions

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,228 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,726 Reputation points Microsoft Employee
    2024-11-20T15:01:11.4733333+00:00

    Hi @Sritharan, Raghuraman

    I'm dropping Create workflows that call external endpoints or other workflows - Azure Logic Apps | Microsoft Learn as the guide for using multipart/form-data in a logic app. If the PDF is getting corrupt, I would double check the HTTP connector settings. See if a different PDF file will work. If it does, then it could be an encoding error on the original PDF you're attempting.

    As for alternatives, it depends. You can push the PDF file to some form of cloud storage and use an appropriate connector to pull it, e.g. Azure Blob storage account, FTP, or OneDrive/SharePoint.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.