'Javascript read a file with pre-given permission

I have some problem and I will appreciate any helps. I have an input with file type and I want to let the user choose some files for further uploading. I want to know is there any way to save the permission user gave for file somewhere, and access the file later? For example assume there's a file uploader, but user cannot proceed the upload process without being logged in. So he goes to login page and after coming back (refreshing the page), I want to have those already selected files and avoid selecting the files again. So since the user gave the permission for that file earlier, can I have that permission somewhere (Localstorage for example)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source