1

Using jquery dropzone plugin, I am trying to alert an error message when users attempt to upload more than one file and then stop/reset the dropzone.

I found this helpful post which got me where I am: How to limit the number of dropzone.js files uploaded?

Fortunately, I was able to get an alert message to appear when maxfilesexceeded is reached, however I am unable to stop the upload of the single file. It seems dropzone will still attempt to upload one of the files if multiple files are sent.

What would be the best way to force an error so none of the files are uploaded and the dropzone element can reset? Thanks!

Community
  • 1
  • 1
john
  • 1,330
  • 3
  • 20
  • 34

1 Answers1

0

I haven't tested it, but you could set autoProcessQueue: false on the initial configuration, and then upload when you are certain there's only one file with .processQueue().

Arturo Torres Sánchez
  • 2,751
  • 4
  • 20
  • 33