Skip to main content

How to abort an in-progress upload?



  • Lucas Nelson

    The link to the github issue ( is returning a 404.

  • Lucas Nelson

    I struggled to get this to work when there are fileupload validations in the mix (eg. maxFileSize). The selection of an invalid file was triggering an upload. This does no happen when using the default 'add' handler.

    I suggest two improvements:

    1. Disable the default autoUpload behaviour:
      autoUpload: false
      // plus any other options, eg. maxFileSize

    2. Use the 'fileuploadprocessalways' event to do the submit:
      $(".cloudinary-fileupload").bind('fileuploadadd', function(e, data) {
      if (data.files.error && data.files[data.index].error) {
      // do something to show the user the validation error
      } else {
      jqXHR = data.submit(); // Catching the upload process of every file

      // and change the UI to let the user know an upload is in progress


Please sign in to leave a comment.