Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.28 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.28 KB

Installation

  1. npm install
  2. npm start
  3. open http://localhost:4002/

HTML4 File Upload

  • create an file tag <input type="file" name="file" />
  • put into an form <form method="POST" action="/upload" enctype="multipart/form-data"></form>
  • form must have enctype=multipart/form-data
  • create an iframe
  • set form.target to the iframe
  • submit the form and will find result in the iframe. usually listner to iframe.load event.

HTML5 File API

  • File API <input type="file" name="file" />
  • FileReader API
  • FormData
  • send the FormData async

Reference

Spec

License

  • See the LICENSE file