Get Binary Data of image from clipboard or URL

Get Binary Data of image from clipboard or URL

  

Hi,

I would like to get the binary data of a image from clipboard or URL. Anyone have any ideia how to accomplish any of this scenarios?

Best regards,

Marcelo


Hi Marcelo,

Found two interesting examples that shows how to achieve this:

1 - https://github.com/redgeoff/paste-image with live demo: https://redgeoff.github.io/paste-image/examples/

2 - https://codepen.io/netsi1964/pen/IoJbg


Hope it helps you!

Hi Marcelo,

Iirc, web pages can't access the clipboard programmatically, as that would pose a huge security risk. So I don't think that's a viable scenario (of course, you could manually paste a binary image in an input box, which various web apps like Slack or Skype or the various WYSIWYG editors use - I'm not sure how to handle that, but no doubt you'd need some JavaScript).

As for getting a binary image from a URL, take a look at the HTTPRequestHandler extension (system extension, so standard available), e.g. the GetRequest_Submit action.

EDIT: I didn't see Daniel's post above, so the first scenario may be answered by his links.

Thanks for the sugestions. I will check what i can do with them.


Regards

Solution

Hi,

Created a component based on one of Daniel's solutions. You can find it here https://www.outsystems.com/forge/component/2491/clipboardimage/

Best regards,

Marcelo

Solution

Awesome Marcelo!

Thank you for your feedback and contribution to the forge!


Best regards

How to convert image URL into binary data for mobile app in outsystems? I have this app which gets images as URLs from a REST API, and then on click I want to send this image to another API which requires binary data as input.

Any help is appreciated!

Hi Shamli Singh,

Please create a new topic for your question, as it is not really related with this over-six-month old post, that way it will get the right visibility and might get faster/better answers to your issue.

Thank you!

Jorge Martins wrote:

Hi Shamli Singh,

Please create a new topic for your question, as it is not really related with this over-six-month old post, that way it will get the right visibility and might get faster/better answers to your issue.

Thank you!

Okay, will do. Thanks though!