All Collections
Help & Troubleshooting Guides
Miscellaneous
Upload image in web view is not working in the real device but works in Run/Test mode
Upload image in web view is not working in the real device but works in Run/Test mode

Permission issue

David avatar
Written by David
Updated over a week ago

In a web run, Permissions will be gotten from the browser, and uploading photo is not an important one.
so most of the time you don't notice this permission.

But in devices this is different, access to the photo library is big permission, and phones are very cautious about it.

Because your photo uploader is in a Web View, Flutterflow doesn't know about it.
Flutterflow adds permissions based on your actions, so when you don't have an upload image action, Flutterflow doesn't add photo library permission.

You need to add this permission to your project

You need to go to Setting / Permissions and turn on the "Photo Library" Permission.


Now, Flutterflow will add this permission to your project, and when you run the app on your device, the app will ask for this permission.
The next step is before you do the upload in your webview, make sure you run the get permission action for it.


objective c - iOS Permission for Accessing Photos not working on device -  Stack Overflow



The permission means the user gives access to the gallery and now you can upload images inside the app. also inside a web view in your app.

Notice: you need to uninstall the app from your device, clear the cache

then again install the app, so the app can ask for permission.

until you run the app and the app doesn't ask for permission, you don't have permission to upload an image in the web view

You need to make sure when you run the app on the device, you give the app the right permission about the photo library.

Did this answer your question?