How to turn off asynchronous image upload for drop

2019-08-18 15:39发布

问题:

I'm using dropzone.js to upload multiple images:

$('#dropzone_contract_images').dropzone({
    paramName: 'image',
    acceptedFiles: 'image/*'
});

But the problem is that when a user selects various images to upload, dropzone.js sends all requests at the same time, so my server (that has only one processor) sometimes responses with 503 code.

Is there any way to turn off asynchronous image upload dropzone.js in order to make it upload images one by one?

回答1:

Reading the documentation on their homepage, you need to set two options in your configuration:

autoProcessQueue: true
parallelUploads: 1