Skip to content

How to prevent multiple uploads with S3? #537

Open
@adnanmuttaleb

Description

@adnanmuttaleb

I want to prevent user from uploading multiple files, things I tried:

  1. I tried to set uploadMultiple to false but still no results.

  2. I tried to invoke disable method when the v-on:vdropzone-file-added event trigger, but this caused the uploading file to cancel.

Uncaught Error: This file can't be queued because it has already been processed or was rejected.
    at o.value (vue2Dropzone.js?92c3:1)
    at eval (vue2Dropzone.js?92c3:1)
    at o.accept (vue2Dropzone.js?92c3:1)
    at o.value (vue2Dropzone.js?92c3:1)
    at o.value (vue2Dropzone.js?92c3:1)
    at HTMLInputElement.eval (vue2Dropzone.js?92c3:1) 
  1. I tried the following options:
dropzoneOptions: {
        maxFiles: 1,
        parallelUploads: 1,
        ...
}

Although a message that says:

You can not upload any more files.

is displayed, but still the awss3 success handler trigger and the file get uploaded.

Details:

My dropzone component:

    <vue2Dropzone
      ref="dropzone"
      id="dropzone"
      :options="dropzoneOptions"
      :awss3="awss3"
      v-on:vdropzone-s3-upload-error="s3UploadError"
      v-on:vdropzone-s3-upload-success="s3UploadSuccess"
    ></vue2Dropzone>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions