Can file upload with form-data in Expose Rest Api ?

Currently, I can use postman upload file like below picture,this can work.

but I firstly used form-data to upload file, it didn't work, so I want to know why? And how?

after I using form-data to upload file, when I download the file, its content is like below, with header and footer

So if someone can tell me if we can use form-data to upload file, and how ? What's wrong with mine?

Hi Cindy,

OutSystems does not natively support multipart/form-data for sending binary files. Fortunately, I've written an extensive article on how to achieve this. If you have any more questions please let me know.

Hi Kilian,

I'm having the same problem with Cindy, how can we expose REST so that other can submit multi-part body to our API. After reading your medium post also looking into your ValidSign component, your multi-part component seems to support for consume REST. Do you have suggestion how to use multi-part body in expose REST?

Hi Lambok,

First, you have to use Multipart Component which my OutSystems friend Kilian made when you upload the File. Then it needs to send through Rest API as a form data send through body content as a binary file. 

First please explore the Demo of multipart which @Kilian shares in community.

I hope you will get the solution as per your needs. 



Hi Lambok,

Unfortunately, that's not possible for now. To expose a REST that excepts multipart files would need a parser, which there isn't right now. However, in the near future this might be added, although I can't say when.

That said, why do you need to be able to receive multipart/form-data? Do you need to expose a REST service that is prescribed by a third party?