0

Is it possible to upload plain text file and store contents to Javascript variable using html5 drag-and-drop api without uploading file to the server? I don't care about old browsers and it doesn't have to support other browsers than Chrome, Firefox and Safari (I don't care about IE if it doesn't support standards as usual). It would be nice if it could be done without any other js libraries or plugins than jQuery.

Hannes Karppila
  • 969
  • 2
  • 13
  • 31
  • try this http://www.html5rocks.com/en/tutorials/file/dndfiles/ –  May 20 '15 at 08:06
  • Most modern browsers support `FileReader()` to read local files. [reference](https://developer.mozilla.org/en-US/docs/Web/API/FileReader) – Michel May 20 '15 at 08:07
  • http://stackoverflow.com/questions/5744064/html5-file-api-reading-in-an-xml-text-file-and-displaying-it-on-the-page Here is a similar question with an answer. – Yordan Ivanov May 20 '15 at 08:08

0 Answers0