Works with any backend npm install Zero dependencies

Custom HTTP Method (PUT)

Use PUT or any other HTTP method instead of the default POST.

(function() {
 new MultipleUpload('#demo', {
 uploadUrl: '/api/upload',
 multiple: true,
 method: 'PUT'
 });
})();

POST unless you say otherwise

method defaults to 'POST'. Setting it to 'PUT' changes the verb on the upload request, which is what object stores and REST APIs that treat an upload as “create or replace this resource at this URL” expect.

What changes with the verb

The body format does not change — the component still sends the file the same way. What changes is what your server must accept, and what a proxy in front of it allows: PUT is more often blocked by default than POST, and a preflighted cross-origin PUT needs PUT listed in Access-Control-Allow-Methods. If uploads fail only after switching the verb, check the proxy before the application.