Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to search for a local file on PC #12

Open
aronnebrivio opened this issue May 19, 2015 · 2 comments
Open

Unable to search for a local file on PC #12

aronnebrivio opened this issue May 19, 2015 · 2 comments
Labels

Comments

@aronnebrivio
Copy link
Owner

No description provided.

@giuscri
Copy link

giuscri commented May 27, 2015

I'm not sure to understand where the problem is, but if you're expecting to traverse the file system without asking anything to the user, this is very unlikely to consist in a bug.

To my knowledge, there exists neither an API for doing that nor any assumption you can do that: except you exploit a vulnerability in the browser's sandboxing, you won't be able to access the file system from client-side javascript.

What you can do is to let the user itself to provide the file to the browser — both by a dialog or a drag-and-drop'able box in the HTML.
From then on, you can use the File API (that is not deprecated anymore, apparently).

If you don't feel like a ninja on the topic, and the W3C draft is of no help, you can check this post on Google's Html5 Rocks that I used when I got stuck on the File stuff.

@aronnebrivio
Copy link
Owner Author

The problem was the user needs to choose a file from PC to import a private/public key and finder.js doesn't work except for Firefox OS.. I solved using an if the app is running on a non-Firefox OS platform.. Another solution would be the drag-and-drop, I'm taking a look to it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants