159
Views
6
Comments
Solved
iFrame in mobile app - upload a file
Question

Hello,


We have an iframe in one of the screens on a mobile app. 


In the site loaded in the iframe, there's an input widget of type file to upload files. 

When we click on that input we only the choice to upload files from Camera or Recorder but with we access the same site via browser we are able to upload files from the file system.


Does anyone know why the difference? And how can we allow uploading files via iframe?


In the scenario we have, upload file from the system is crucial for the functionality to work.


Thanks!

Patrícia Ferreira

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi,

My point is, if you load a third party (not OutSystems) page in an Iframe, you cannot control what happens on that page. That should be coded on that page.

Regards,

Daniel

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Patricia,

Is it an OutSystems page you load in the iframe or another website?

If it is OutSystems, than use the OutSystems features to handle the upload.

If it is not OutSystems, the webpage that you load in the iframe should have the logic to upload.

Regards,

Daniel

2020-09-17 10-48-46
Patrícia Ferreira

Hi Daniël,

Thanks for your reply!


The page that we are loading in the iframe isn't Outsystems.


I don't believe that the problems lies with that page since if we access it from a device browser we can upload the files from the file system, only on the iframe we have on our Outsystems app we can't do it.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi,

My point is, if you load a third party (not OutSystems) page in an Iframe, you cannot control what happens on that page. That should be coded on that page.

Regards,

Daniel

2020-09-17 10-48-46
Patrícia Ferreira

Hi,


But does that explains the different behavior between uploading a file using the device browser or uploading a file on the mobile app via an iframe?


I understand what you mean if we would access the site via the browser and have the same behavior as the iframe, but they differ which leads me to a limitation either from iframe, Cordova or Outsystems.


Thank you!

Patrícia

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Patricia,

The Iframe in OutSystems is just an HTML5 Iframe, so there are no OutSystems or Cordova specifics I can think of.

When you say browser, you mean the browser on the mobile device running the OutSystems mobile application?

Where does the external page upload too?

Regards,

Daniel

2020-09-17 10-48-46
Patrícia Ferreira

The problem lied in the iframe like Daniël Kuhlmann told. It was using an html attribute that wasn't supported in the android browser but was in chrome so that's why it was working on chrome and not in the app.


Thanks

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