-2

I need to get the list/names of all the files (and possibly sub-directories they're located in) stored locally on an Android device from a web browser. Please note that this needs to be directly from a web browser (like Chrome/Firefox on Android) and not from an app installed on the device. I only need the names of the files, not access to them. Is it possible to do this through Flash or Javascript or another way? What are all the possible ways to do this and the best way?

Also, is it possible to determine from the web-browser if the device accessing the web-page is an Android/iOS/Windows device and, if yes, how?

user3566039
  • 43
  • 2
  • 8
  • Yeah I'm sure there's a random website out there in China or Nigeria just checking my entire hard drive (even sub-directories) while I'm here on Stackoverflow. What makes you think it's even possible to do such a scary thing? At least an app is installed by user (me) so that's already half the permission to read my files. – VC.One Mar 18 '19 at 15:46

1 Answers1

0

In order to determine the device you can use the userAgent-property of the Navigator-object as shown here:

https://www.w3schools.com/jsref/prop_nav_useragent.asp

see also: JavaScript how to check User Agent for Mobile/Tablet

Reinhard
  • 11
  • 2
  • I think you got down-voted for a **got link(s) only** answer. This makes it low quality. I get it that you cannot yet comment either (so you're forced to share tips via an Answer box) – VC.One Mar 18 '19 at 15:38