46
Views
23
Comments
Solved
[Get Binary Data By URL - Server Side] Loading an image
Question
get-binary-data-by-url-server-side
Service icon
Forge asset by Muneer Alhawi
Application Type
Service

I am trying to load images with this asset and store into the database but when I try to display the image I get this:

2022-12-30 07-28-09
Navneet Garg
Solution

Yes you can not access this image due to server restriction put by the seeklogo. 

Access to the resource is prohibited. 

even not able to fetch using postman. need to check other solution.

2022-12-30 07-28-09
Navneet Garg

can you share more detail like oml or test link it will be more help for us to find out the issue and suggest you the solution.

2024-01-05 16-00-17
Filipe Lourenço

Unfortunately I cant share the oml but it is simple. Create an entity with a url text ,a binary data attribute and fill with this "https://upload.wikimedia.org/wikipedia/commons/4/44/Debenhams_logo18.png", then try to convert the url to a binary and fill the other attribute. If you display the image with the binary attribute content in a iage widget from outsystems it will not display the image.

2022-12-30 07-28-09
Navneet Garg

Are you setting type to binary data ?

2022-12-22 10-00-39
Beatriz Sabino

Hi Filipe,

Which action are you using to convert the URL to a binary? Are there any errors in the console that could help identify the issue?

2024-01-05 16-00-17
Filipe Lourenço

Yes, can you share that oml to look what I have wrong?

2022-12-30 07-28-09
Navneet Garg
TestABC.oml
2024-01-05 16-00-17
Filipe Lourenço

I dont see your component in the module

2022-12-30 07-28-09
Navneet Garg

you do not need any plugin to show image from binary data. if binary data is in you database. I am installing the plugin and share new oml soon.

2024-01-05 16-00-17
Filipe Lourenço

Yes but where is this component converting the url?

2022-12-30 07-28-09
Navneet Garg

I testing Get Binary Data By URL - Server Side (O11) and yes some error in this

I used https://www.outsystems.com/forge/component-overview/2763/binarydownload-o11

it is working fine.

I will check Get Binary Data By URL - Server Side (O11) in detail later and let you know exact problem. meanwhile may be extension team might give you the answer.



2022-12-30 07-28-09
Navneet Garg

Please check Demo5 screen. I dont know why it was not worked previosuly may be I did some silly mistake.


https://personal-u1aragiz.outsystemscloud.com/TestABC/Demo5


TestABC2.oml
2024-01-05 16-00-17
Filipe Lourenço

Once more I am not seeing this component working in your oml module TestABC or TestABC2

2024-01-05 16-00-17
Filipe Lourenço

It seems that when the action is ran it popups up a message saying 403 forbidden

2022-12-30 07-28-09
Navneet Garg

can you share screenshot because it is working on my environment.

https://personal-u1aragiz.outsystemscloud.com/TestABC/Demo5?_ts=638763830658783154

I tested it in new fresh application as well and it is working 

https://personal-u1aragiz.outsystemscloud.com/TestBI/Demo?_ts=638763830287030372







UserImage.jpg
Nani

@Filipe Lourenço
Please try RichMail server action.


If still getting a same use please Check below link once, might help you
https://www.outsystems.com/forums/discussion/55042/http-status-403forbidden/


2022-12-30 07-28-09
Navneet Garg

Hi you got the solution or need help please share details so I can help you.

2024-01-05 16-00-17
Filipe Lourenço

Test with this url 
https://images.seeklogo.com/logo-png/51/1/jd-group-logo-png_seeklogo-513949.png

2022-12-30 07-28-09
Navneet Garg
Solution

Yes you can not access this image due to server restriction put by the seeklogo. 

Access to the resource is prohibited. 

even not able to fetch using postman. need to check other solution.

2024-01-05 16-00-17
Filipe Lourenço

Ok. That's the issue. Thanks

2022-12-30 07-28-09
Navneet Garg
2022-12-30 07-28-09
Navneet Garg

I updated extension BinaryDownload and it is working you can use it


TestDownloadImage.oap
BinaryDownload.xif
2022-12-30 07-28-09
Navneet Garg
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.