How to transform file Content-Type from Multipart/form-data to application/pdf ?
Hi,
I have a big issue with file content-type during uploading the files into Messagebird server.
After successful uploaded into Messagebird server, but the file content-type always in Multipart/form data.
But the requirement from Messagebird the Content-Type must in application/pdf . Therefore I tried with postman to test and it was perfect result. But not sure where is my mistake from the code. Below is my custom function :
downloadfile = invokeurl
[
type: GET
connection:"downloadfile"
];
// Uploading file attachment to Messagebird Server
head = Map();
head.put("Authorization","AccessKey XXXXXX");
head.put("Content-Type","application/pdf");
head.put("Content-Disposition","attachment;filename=Ticket_Voucher.pdf");
messagebird = invokeurl
[
type :POST
headers:head
files: downloadfile
];
info messagebird;
fileID = messagebird.get("id");
Below is the requirement from Messagebird
After uploaded successful, i use websniffer.com to check the files and the result always in Multipart/form-data but not application/pdf.
I need help from all the expert to get rid of this problem.
Thank you
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.