Hello,
I have a my application a list of users. Each user has a picture attached to it that is saved into database in a Blob field. I order to be able to update the picture from rollbase I have a web-handler service that exposes the deep-link required to view and edit the picture. I can upload and save the picture in the database without problems. However when I want the display that picture in the view grid the thumbnail is not generated and looks like this
The web-handler that I use inherits from WebHandler and overwrites methods handleHead/get/put/post etc...
The content type is set to "image/png" and the required ad-notations are used in the dataset that is used to create the JSDO catalog:
@openapi.openedge.entity.field.property(field="FileJson", name="type", value="mr.image").
@openapi.openedge.entity.field.property(field="FileJson", name="format", value="string-json").
The Field in the JSDO catalog looks like this :
" "FileJson": { "type": "mr.image", "ablType": "CHARACTER", "default": "", "title": "File", "format": "string-json", "contentEncoding": "binary", "readOnly": "false" } "
When I'm the update mode and I click the link the following deep-link generated is:
"localhost:8830/.../File
and the picture is automatically opened by the browser.
Can anyone knows how to decode the value after "&externalFileUrl=" ?
In view mode: the following URL is used:
Entering this url in a new page browser triggers a Apache server error 404 not found.
Anyone have any idea why the thumbnails are not generated how to investigate the problem?
Hi -
Can you please post what is the url you see on the grid (list view) page where the image doesn't render fine ?
Also, post the url in the view page for the same record where the image renders fine.
Regards.
Hello,
The view url link that is not working is:
The url that is working is :
So basically i need to know what is behind the encoded part: "XRUXdOQAEoifMR4F%2BhH6kGB%2B2Q8r39pz5AyPffgVOxmewAO2vBP5%2BLAWpTmHCqn4n"
I'm using Openedge 11.6.
Hi -
I tried decoding the encoded part you sent and its value is "localhost:8810/.../214" in both cases. I think having objDefId=85251 is making the difference here. We are still investigating the issue but meanwhile can you confirm if manually adding the '&objDefId=85251' to the end of the not working url renders the image fine ?
Regards.
Using a crafted url as you mentioned does not solve the problem: "localhost:8830/.../Image
The decoded URL you posted is indeed the end point for the image for web application.
Thank you for confirming. So, the url to image is correct in both cases but it seems the other parameters in the url are making the difference. I will investigate this further and get back to you.
Regards.
Hi,
Please let us know if can you able to download the image using browser without any auth headers using decoded url.
For image files the Rollbase wont send auth headers in the get request. In Rollbase image files will have public access.
Thanks and Regards
Pradeep
The OEPAS that runs the web application has authentication enabled. The web.xml was changed so the "contextConfigLocation parameter changed to reference /WEB-INF/oeablSecurity-basic-oerealm.xml instead of /WEB-INF/anonymous.xml". Also "oeablSecurity-basic-oerealm.xml" has been changed to implement the security needed. So in order to download the picture from the database I need to authenticate as "user@domain.name" and a password. The Rollbase client in Authentication menu from Administration setup has set the authentication to "Openeedge" and the object use "use current user" as authentication method.
The desired resolution will be to be able to use the auth headers when requesting the images from the web server.
We will do this enhancement where we use Guest User credentials as auth headers for image access.
Logged enhancement 36610. Which will be available in 4.2 release.
Thanks and Regards
Pradeep
Hi, We were hoping this was going to be in RB 4.1. Can you please clarify?
Hi,
This issue got fixed in 4.1 release which was released last week.
Thanks
Vasantha
Thanks for clarifying!