Skip to content Skip to sidebar Skip to footer

Can I Use Javascript's Filereader On A Local File If I Know The Location?

I am using JavaScript with FileReader and readAsDataURL so I can convert images to base64 code and then store and display the base64 image code at a later time. I have a button t

Solution 1:

You can't. Allowing a web site to open arbitrary local files would be a serious, serious security concern. There would be nothing to prevent things like grabbing password files or other sensitive information without the user knowing. There have also been strict restrictions on the file input for that reason and to clearly communicate the intent.


Post a Comment for "Can I Use Javascript's Filereader On A Local File If I Know The Location?"