202
Views
3
Comments
URL to load image from database
Application Type
Traditional Web

Hi.

I'm using the OneSignal API to send PUSH notifications to users.

One of the parameters is a text parameter for a thumbnail image. It can, apparently, be a URL or a drawable resource.

I've built an empty page, with an image entity. The image is configured to retrieve the image from the database based on an input variable. An example link looks like this:

https://personal-4plka1hb.outsystemscloud.com/EDApp_Web/Learn_Show.aspx?Bin_ID=127

But, this doesn't work...
A simple image URL from google does, so I wonder if it's because the image in the Outsystems page is wrapped in a container, or something else.

I've also tried sending a base64 decode of the binary data as a text string. That didn't work either.

I'd be grateful for any help or direction.

Thank you

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

Are you using Image widget to show the Image?

You can check here how you can display a binary using image widget and binarytobase46 conversion

Check here this  might help

I hope this will help 

Le me know if you are looking for this scenario only if you have something else please share some more information.

Thanks & Regards

Tousif Khan

2021-11-22 00-14-28
Leigh Rogers

Hi Tousif and thank you for your prompt reply.

I'd already tried the image widget to no avail.

In the end, I created a php file on one of my servers, and instructed it to get the binary based on an ID in the URL. Added a header, and echo'd the row retrieved from the database. Works immediately.

I'm sure it was probably something I was doing wrong with outsystems. But I have a working solution now!

2023-10-21 19-42-11
Tousif Khan
Champion

Thats great!

You have found a solution 
You can further explain it and mark it as a Solution, so if someone else have same issue they can figure it out easily by seeing your solution

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