Get BinaryData from an Image file path
Question
Application Type
Mobile

Hi,

I have an image in my resources and I need to send it to a other module as a BinaryData.

How can I convert the static file image to a BinaryData?

Solution

I used HttpBinaryGet from RichMail and it solved the problem.

Thanks for you help.

Hi Pedro Sá,

If you have the image as resource, you can create a function in the image source module, and send the Content through the function (output binary data).

But you can put the public image in a LIB module and consume it in the modules where you need it. I think that's the best approach, but I don't know the context in which you need binary data.


Best Regards,

Pedro Canário

mvp_badge
MVP

Hi Pedro,

One more suggestion for the mentioned use case is to use the GetRequest_Submit server action (HTTPRequestHander API Module) and pass the image runtime path.

Refer to this link: https://www.outsystems.com/forums/discussion/61546/download-files/#Post239367

Or else set the image to public and reference it via Manage dependencies.


I hope this helps you!


Kind regards,

Benjith Sam

Solution

I used HttpBinaryGet from RichMail and it solved the problem.

Thanks for you help.

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