REST: native support of multipart/form-data


Many REST services implement sending files, documents etc. by having a body with multipart/form-data. There are many questions on the forum about this, e.g. here, here and here. Unfortunately, the OutSystems Platform lacks native support for this, leading to workarounds like this Forge Component or "manually" modifying the request data in the OnBeforeRequest, which leads to things ugly code like this:

(Yeah, that's mine :).)

So it would be a great addition to the Platform if it had native support for multipart/form-data for REST services, at the very least for consuming them. That would make our lives just a tad bit easier!

Created on 29 Jun 2018
Comments (14)


I've dealt with this problem in the past, a definitive solution would be much welcome.

PS: your flow art design qualities need improving. :p

I already wrote it's ugly code :).

I've already implementes some REST services with uploads in outsystems, so I would gladly pay a beer to have this implemented!

I'm in the middle of implementing something like this. Killan care to share that snippet to get me started?

I've published this explanation on Medium and created this component to deal with the more difficult parts.

Good Idea!!!

good idea, I'm struggling with the multiparts right now.

Hi Peter,

Did you see my links to my article and Forge component? If you're still struggling, feel free to post a question on the forum.

Yes, I found later and then I've implemented the component Multipart/form-data , works fine, thanks..

Great, be sure to give it a few stars :).

Good Idea :)

My Vote for you !!!

Hi Kilian,

Is you component can be used in reactive web development? Or it is only suitable for traditional web?

Hi Ambikesh,

Such questions are better asked in the component's subforum, this is the Idea section!

This would be an awesome addition, especially in the exposing REST section where we can't use the same type of workaround as when consuming.