Miguel Cardoso
Miguel Cardoso

Reputation: 19

How do i get the full path of the file in Firefox

How do i get the full path of the file in Firefox with JavaScript?

Thanks in advance!

Upvotes: 0

Views: 1659

Answers (1)

T.J. Crowder
T.J. Crowder

Reputation: 1075159

Basically, you can't, for security reasons.

However, the new/upcoming File API allows you to do just about everything you might want to do by getting the file's full path, without giving you the file's full path. You can read the file (yes, client-side), get a data-URI for it, etc. Example and details in this other question here on SO.

Upvotes: 2

Related Questions