All threads / Upload in webview

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Upload in webview

Rafael Soares asked in Rails

I have a Rails web application, and I hired someone to develop an android and iphone app for it, which is just a webview opening the website.

In the web app, the user can upload an avatar picture. But uploading is not working from the app, it just doesn't open the dialog box to choose the file.

Anybody had this issue before and knows if there is a way I can solve this issue from the rails side?

Hi Rafael - this could be any of a million different things, but the most obvious one is permissions. Does the iOS app ask the user for permission to access the camera roll? If it doesn't, then that's at least part of the problem. The app needs to get the User's permission before it can pull up the saved photos from the phone and/or access the device camera.

Hi Chris, thanks for the reply,

It does have permission to the camera roll. Actually I just did a test with a very simple snippet of code. I've put the following in a html file in the public folder.

<html> <body> <input type="file" name="test" /> </body> </html>

But it still doens't open the dialog box. Do you have any experience with this?

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.