Fetching attachment in Rollbase Mobile

Posted by Harrie Kuijper on 06-Nov-2014 04:03

Hi all,

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?

All Replies

Posted by Orchid Corpin on 06-Nov-2014 10:49


Is this a file upload field you are trying to view into the mobile app?



Posted by Harrie Kuijper on 06-Nov-2014 11:58

Hi Orchid,

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.

Posted by Orchid Corpin on 06-Nov-2014 12:49

Ok, let me test this first if could replicate the issue or find another option if there is.



Posted by Orchid Corpin on 10-Nov-2014 13:34

Hi Harrie,

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.



Posted by Harrie Kuijper on 17-Nov-2014 02:52

Hi Orchid,

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.

Posted by Orchid Corpin on 17-Nov-2014 09:47
I see, I only tested it in browser emulator from the builder and it was working fine.
Will try this in real device and look for alternative way.

Posted by Harrie Kuijper on 11-Dec-2014 01:47

Do you have updates on this issue?

Posted by Sridhar Duggi on 12-Dec-2014 01:50

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.

Posted by Harrie Kuijper on 12-Dec-2014 02:43

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.

This thread is closed