HTML App - file selection
-
I am currently developing a Ubuntu Touch App and I'm using the HTML template. I do not use any libraries or dependencies, but pure HTML + JavaScript. I've tried the following to allow the user to pick a file on the device:
<input type="file" accept="image/*"> <input type="file" accept="*">Both tags lead to a window with the following message (in clickable desktop as well as on the device):
Sorry, there aren't currently any apps installed that can provide this type of content.
In the clickable log I've also noticed the following message:
file:///usr/share/morph-browser/ContentPickerDialog.qml:118: ReferenceError: acceptTypes is not defined
(I'm not sure if this message has something todo with my problem)How can I enable the file selection?
-
@schlicki2808 hello, never worked on html apps on UT, but files access is done with ContentHub.
There is a raw documentation here: https://api-docs.ubports.com/sdk/apps/html5/ContentHub/ContentHub.html
-
I found the solution! I came across the documentation for the policy groups. So I added
"content_exchange"to the list of the"policy-groups"in the apparmor file and - voila - the input file dialog shows me a list of apps.Thanks for the hint with the Content Hub!
-
S Schlicki2808 marked this topic as a question on
-
S Schlicki2808 has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login