I'm having troubles fetching attachments from Rollbase Mobile. When I try displaying it by mapping the rollbase attachment field to a HTML element in mobile, it only returns the name of the attachment and no content.
So I found a way of getting the attachment from prod1/servlet/File, which I put in a <object> tag in a HTML element. This works fine, but now I have a "permission denied" issue when getting the attachment (this is correct since I'm not logged in to prod1). Getting the document from REST (rest/servlet/File) returns a 404 error.
Any suggestions how I can do this?
Is this a file upload field you are trying to view into the mobile app?
Forgot to mention, yes it is a file upload.
The workaround I describe, is a tirgger which fires everytime the file upload changes. It fills a textarea with the URL of the file uploaded. But no success.
But main problem is, that I cannot show/view a file upload field.
Ok, let me test this first if could replicate the issue or find another option if there is.
I can now view file upload field in mobile.
I use "Link" component instead of label, and in my Rollbase app I created a text field to store the URL of the file upload field and map it the Link component.
Thank you for your suggestion, but unfortunaly it doesn't work on mobile devices. The problem is that I'm not logged into prod1 when I'm using a mobile device. I'm only logged into the rest servlet. When accessing the link with the attachment, the phone tries to connect with prod1 where I'm not authenticated.
Do you have updates on this issue?
Viewing an attachment in a mobile App in not supported yet.
The Issue is on clicking the link of the Url is directed to browser for displaying the attachment. The session is created in Mobile app, so the browser will get session issues when accessing the link ( unauthenticated).
So one solution is to create a web preview widget from an url in the Mobile app builder.
We will address this in next releases.
Creating the web preview widget didn't work, I already tested that like I said in my first message of this thread. That's because you authenticate with the REST servlet, and you get the file from the Storage servlet.