Home Ask Login Register

Developers Planet

Your answer is one click away!

user2985035 February 2016

How to get files[0] or [object File] of certain file populated by using its full path?

I'm trying to make the user click once on a button with on-click function and initiate file upload, without making him pick the file through clicking first on "Choose File" which opens file dialog box. Is this possible through populating the files[0] object array or [object File] if I have the full absolute path of such a file ?


tanenbring February 2016

No, without user input allowing javascript direct access to the user's file system would pose a large security risk.

Check out this answer.

Post Status

Asked in February 2016
Viewed 3,269 times
Voted 5
Answered 1 times


Leave an answer

Quote of the day: live life