Database Images URL

Database Images URL

  

Hello,

I am using the URL of my database images in an expression, i cannot use an image widget because I have content that is statically inserted into the database, and the database images urls are also inserted with this content.

the URL is of this type:

"/ModuleName/_image.jsf/iDBtMAFPjB9sLBfyGOe_TJGmZrMu41Q=/.png"

The entity that holds the images is an outsystems entity.

Each time I redeploy from development to production, one of these happens to the images in the production database:

 the URL of the image changes , or the image gives a bad request error, and if i make an image widget to display it, it does not get displayed, even though when i query it from inside the database it is still there.

Any solution for this? or Is there some other way i can access the database images in my static content?

And does this hashed URL change for each image every deploy??

Thanks


Solution

Hi Mariam,

The GUID in the URL is indeed unstable, so you should definitely not rely on it. I'm not sure why you couldn't use an Image widget, as I don't understand what you mean with "statically inserted".

That said, if you want a reliable URL, you need to create a blank Screen yourself that accepts some kind of identifier and has a preperation that loads the image from the database and end in a Download.

Solution

Thank you i will go with this blank screen solution. 


Kilian Hekhuis wrote:

Hi Mariam,

The GUID in the URL is indeed unstable, so you should definitely not rely on it. I'm not sure why you couldn't use an Image widget, as I don't understand what you mean with "statically inserted".

That said, if you want a reliable URL, you need to create a blank Screen yourself that accepts some kind of identifier and has a preperation that loads the image from the database and end in a Download.