0

I know that a fake path is used when you want to upload a file or something but I want my script to work offline only, so is there a way jQuery may offer to get the local file path? Since the File object stores it in FF as mozFullPath and Chrome a relative path to the script file in webkitRelativePath, is there a crossbrowser solution? Also it's a bit confusing if they use C:/fakepath/ even when you're on linux, how to access that? Thank you.

In short: 1. Linux + input file -> C:/fakepath/ -> fail? 2. FileList -> File -> mozFullPath / webkitRelativePath / ... -> any crossbrowser function to get the full path out of this?

  • I will try the filereader but I still don't feel like my question is answered. Is it misleading? – user3341388 May 15 '14 at 08:15
  • Not revealing the real path of a file is an HTML5 specification - there's no way around it. It's a security feature designed to protect users from people from being able to do nasty things to their computer, local HTML file or not. Imagine if you'd been tricked into downloading an html file from an email and it had access to your local file system? – edcs May 15 '14 at 08:31

0 Answers0