This question is related to "What are the different file types supported in Create File API ", since I am not able to update that thread, raising the new one.
I am using sample code provided for "Create File" API @ Create a File » Marketo Developers to create files of different types.
I am able to create text/plain and text/html type of files. When I tried to create files of types png, docx, pptx, jpeg, jpg with respective content-type header in multipart request, API returns "file created successfully" but when I tried to access it from Marketo UI link, I am not able to get the original file (file seems to be corrupted)
How should we proceed to use this API's for mentioned file types?
Any pointers will be helpful.
Thanks,
Deepali
What do you mean when you say that the file appears corrupted?
Hi Kenny,
What I meant by "Files" getting corrupted is that when I tried opening
Thanks,
Deepali
What content-type are you passing in with these types of files? This will affect how the file is served. .docx especially is a compressed format and passing it in as text would be problematic.
Thanks Kenny for the response
Content Types I am passing are :
What is the correct way to pass data and expected content type header for API for this types?
Thanks,
Deepali
That looks correct from here. You may want to diff the original and the resulting download to see what the differences are and potentially log a support ticket with the details.