← Back to team overview

ubuntu-phone team mailing list archive

File input in HTML5 apps

 

Hi all,

I've been fooling around with a HTML5 app recently, and I decided to see if an <input type="file"> would work. I got it working on the desktop and then tried it on the browser on the phone. I was pleasantly surprised to see that it Just Works: activating the input caused a Content Hub peer picker to show up. I picked a peer, picked a content item, and clicked okay. The <input> got a HTML File object that worked just as it does on the desktop. Nice!

Then I tried to run the app in the HTML5 launcher, and unfortunately it broke. Now when I trigger the input, I get a message in the app output: "Content requested a file picker, but the application hasn't provided one". I have no idea if this is coming from the WebView, from the HTML5 launcher, or from a Content Hub service. Is there any configuration I need to do to enable the Content Hub for the file input? (I've done cargo-cult pasting of various json files into the app configuration, but I don't really understand what's going on here.) Is there something else I need to do?

Thanks,
Robert



Follow ups