-1

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 ?

user2985035
  • 569
  • 3
  • 8
  • 18

1 Answers1

1

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

Check out this answer.

tanenbring
  • 780
  • 4
  • 14
  • Ok, thank you for your answer But do you know the structure of files[0] object array or [object File] can you give me a simple example please. – user2985035 Feb 08 '16 at 16:42