mardi 28 mars 2017

How to choose a file and save the path's file via JS [duplicate]

I want to click on a button to open a window and choose a file. I'm using this code for the choosing:

<button onclick="document.getElementById('file-input').click();">Open</button>
<input id="file-input" type="file" name="name" style="display: none;" />

How can I save the path? (For example c:\temp\song.mp3)

I dont need to download the file. it's a local file.




Aucun commentaire:

Enregistrer un commentaire