What are the different types of upload mechanisms?
HTML 5 File API, Forms, Ajax? What are the differences for the backend implementation?
The Backend is written in node.js.
You have two options. The first one is using a form, the second one is xmlhttprequest
.
The form
method: you can use an iframe so you can have a 'transparent' file upload (means user won't see a page-refresh or similar).
The xmlhttprequest
is supported only by newer browsers, so you must decide which browsers will be able to upload files...
That said, there are a few JavScripts that will do everythin for you (detect if xmlhttprequest
is supported, if yes, use it, if no, use iframe).
See jQuery File Upload for example.