MultiPart API returns header and footer in document
I published an API to post a document with a Body of type multipart containing: File to be uploaded Filename. Filename also contains the extension The input parameter "File" is a specilization of FileDocument: If I save the received File, the body of the file document contains a header and footer. See the picture below. This is where i uploaded a txt file with a start & end so you can clearly see the added header and footer. I cant sort out what I should change. Please let me know if you need more information.
Jitze de Groote
There is no native support for form-data yet.
You would need to change the parameter type to String, and take the text file data out of it by using string function calls.
I think that multipart is not supported natively by Mendix because they deprecate it. I would also not recommend the use of multipart messages:
First of all, the number of files is undetermined, as it can contain many parts.
Furthermore, multipart messages use the Base64 encoding and this increases the file size with ~30%.
You could post this as an idea on this forum for a feature request to support multipart messages.
Thats what I assumed Joost. But changing the string is a not my prefered solution, since this functionality is of major importance. I will solve it by just going for a Binary file input of content-type: application/octet-stream.