Using Javascript Read Bytes of Any Hosted File -


using java script can read file (selected using type="file") bytes bytes of file using myfile = new filereader();.

this page has nice example : html5 file api read text , binary

my question can similar stuff using file hosted in server

http://localhost/file.bin

you can't unfortunately, filereader api local files only.

you have options thogh, use http/xhr request download online resource, save local server , pass local file path filereader api, can't directly url


Comments