Using the readAsBinaryString
method of the FileReader
, how properly upload images and such via Ajax? I know how to do the uploading; files get uploaded, and text files do display well but images cannot be rendered after such a transfer over the net. Note: the work is for a web service so I do not have access to server-side scripting.
Asked
Active
Viewed 239 times
1

sofa
- 11
- 1
-
Are the images on the server? Is the problem uploading the images or rendering the images? – Mark Nov 20 '10 at 13:23
-
You can't upload files via XMLHttpRequest. How exactly are you doing this? Can you post the code you're using? – Pointy Nov 20 '10 at 13:34
-
Mark, the problem is uploading images properly. They get uploaded but does not open after the upload. Though text files are alright. – Nov 20 '10 at 13:30
-
Pointy, I can upload files via XMLHttpRequest. It ain't my own know-how, so you could google for it. As for images, somehow extra bytes get added to the sourse after the upload, so the file cannot be decoded. – Nov 20 '10 at 13:58