Hi,
I am trying to upload a file to API endpoint, I am using form-data append method explained here: https://platform.zapier.com/cli_tutorials/hydration. But the issue I am facing is our API only support multipart binary file and Zapier is sending response from `request(file)`.
So is there any option to convert Hydrated File URL to get file path, so that I can send binary data to the API?
Thanks
Page 1 / 1
Hi
Hi all,
If someone landed here for the solution: After digging a lot I have found the solution, the issue is caused by using latest versions of “form-data” and “request” repositories. So if you are having same issue just downgrade the above mentioned repositories to exactly:
"form-data": "2.1.4",
"request": "2.81.0" // Most important
And do specify a filename parameter while appending file to formData like:
formData.append("file", request(bundle.inputData.file), {
filename: bundle.inputData.name // This filename is important, if removed it will throw error
})
Regards,
Karan Singh Sisodia
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.