Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Opening hidden file from a toolbar button

$
0
0

@cwdev wrote:

Hello everyone!

I’m developing a PWA with ionic and I have spent the last couple hours searching the web to figure out how to achieve this. I’m aware that a file dialog can only be opened from javascript when it is user initiate, but I’ve tried everything I can think of and still can’t get it to work. I’m doing this so a user can upload a profile picture by clicking on the photo in the center of the profile page. I obviously don’t want an ugly input box.

If anyone has experience with this I’d love to hear from you. Most of the examples I’ve seen use jquery, but I don’t see why it couldn’t be done with plain javascript. I’d also rather not have to use jquery in my project just for this single issue.

Thank you so much!
Chris

Edit: I just noticed that I said I’m trying to do it from a toolbar button in the title and the profile picture in the body of the post. I’d prefer the profile picture method, but I’ve been trying to achieve it from the toolbar. I’m thinking it should work the same for either scenario, since both are user initiated clicks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>