60
Views
15
Comments
Solved
[Multipart/form-data] Please port this to ODC
Question
multipart-form-data
Service icon
Forge component by Kilian Hekhuis
Application Type
Service

ODC didn't have native capability for multipart/form-data yet.

And there's no available Forge component yet.

Can you please port this component to ODC?

Solution

Sorry, you might misunderstood me.

I did not create Forge for this, since I knew it was already created but under approval (which is longer in ODC), and I knew from support chat that Multipart is scheduled for built/in support (like in O11) in Q4 2003.

I got helped by Principal for the multipart, but then me and my team allocated some times after some busy project, to learn about it.

You can open Multipart O11 Forge Plugin in O11 Service Studio, here's what I used (notice the app logo):


Create ODC Multipart Library Module in ODC Service Studio.

Then in O11 Service Studio, copy the structure Part, paste to your ODC Multipart plugin module

Next copy the O11's exception BadData, paste to your ODC Multipart plugin module 

Then copy everything in red box from O11 to your ODC Multipart plugin module


You will notice many errors about BinaryConcat, which is not built-in action in ODC, and also not available yet in ODC Forge.


I will provide the BinaryConcat that you need to complete your ODC Multipart plugin Libray Module.


I will provide 2 zip files:

1. Harlin_BinaryConcat_Source Code
If your enterprise app do not trust pre-made runtime library, use this.
After extract to a folder, you review source code, then launch Windows PowerShell to execute file generate_upload_package.ps1 (provided you have installed DotNet Core)

2. Harlin_BinaryConcat.zip is pre-made runtime library


Just upload runtime library it in ODC Portal > External Logic > Create Library
After upload, you need to go back to External Logic, and click Review Content button, and publish it.

After publishing finished, then you can add dependency to HarlinBinaryConcat action.

Use HarlinBinaryConcat action to replace all BinaryConcat reference errors.

After all are replaced, then there should be no errors, and then you can publish your ODC Multipart Library and start to use it.

Hope it helps...

Harlin_BinaryConcat_SourceCode.zip
Harlin_BinaryConcat.zip

Hi Harlin,

Unfortunately, I do not have the knowledge to port this to ODC, I'm not even sure this is possible at all as ODC does not, to my knowledge, have extensions.

Hi @Harlin Setiadarma ,

I was able to port the component to ODC already. Currently, it only has the option to consume Multipart/Form-Data endpoints.

I will also have to work on the ability to expose endpoints that support Multipart/Form-Data.

I'll work into getting this available on ODC Forge soon.

Regards,

That's great João. It'd be interesting to know how you did it :).

It was not that hard, I was able to copy past the majority of the code from the current component.
Besides that, all I had to do was implement the BinaryConcat extension in ODC by following our documentation:
https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/extend_your_apps_with_external_logic_using_custom_code/


Regards,

Cool and thx. I've got 0 experience with ODC, so couldn't do it myself.

That's really a great news... 

ODC didn't support it naively yet. 

Even if supported, only for consuming, not exposing like in O11. 

Wel, exposing is still not supported, as João wrote, just consuming.

Dear joao,

Awesome to hear you're porting this component. I only recently discovered this component, but need it for a ODC implementation I'm working on. Hopefully you'll be able to quickly get this to the forge! (BTW, I only need it for consuming an endpoint)

kind regards,

Vincent

Hello @João Barata

It's good to hear that you are working on this forge.

May I ask when that forge will be ready to use, as I really need it for my current project? 

ODC Forge approval is way too long... 

Contact me if you need it asap.

Solution

Sorry, you might misunderstood me.

I did not create Forge for this, since I knew it was already created but under approval (which is longer in ODC), and I knew from support chat that Multipart is scheduled for built/in support (like in O11) in Q4 2003.

I got helped by Principal for the multipart, but then me and my team allocated some times after some busy project, to learn about it.

You can open Multipart O11 Forge Plugin in O11 Service Studio, here's what I used (notice the app logo):


Create ODC Multipart Library Module in ODC Service Studio.

Then in O11 Service Studio, copy the structure Part, paste to your ODC Multipart plugin module

Next copy the O11's exception BadData, paste to your ODC Multipart plugin module 

Then copy everything in red box from O11 to your ODC Multipart plugin module


You will notice many errors about BinaryConcat, which is not built-in action in ODC, and also not available yet in ODC Forge.


I will provide the BinaryConcat that you need to complete your ODC Multipart plugin Libray Module.


I will provide 2 zip files:

1. Harlin_BinaryConcat_Source Code
If your enterprise app do not trust pre-made runtime library, use this.
After extract to a folder, you review source code, then launch Windows PowerShell to execute file generate_upload_package.ps1 (provided you have installed DotNet Core)

2. Harlin_BinaryConcat.zip is pre-made runtime library


Just upload runtime library it in ODC Portal > External Logic > Create Library
After upload, you need to go back to External Logic, and click Review Content button, and publish it.

After publishing finished, then you can add dependency to HarlinBinaryConcat action.

Use HarlinBinaryConcat action to replace all BinaryConcat reference errors.

After all are replaced, then there should be no errors, and then you can publish your ODC Multipart Library and start to use it.

Hope it helps...

Harlin_BinaryConcat_SourceCode.zip
Harlin_BinaryConcat.zip

I've published the port of this component in ODC alongside the necessary dependencies of the BinaryConcat component and a new MultiPartFormDataParser component needed to expose Rest Endpoints using Multipart/FormData.

The components are currently in the approval process, but once approved we should have the same functionalities as this one available in ODC, including the ability to expose Multipart/FormData endpoints.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.