Topic: Unexpected behavior - File upload plugin

allancmello premium asked 5 hours ago


When we use the "Input maxFileQuantity" to set the maximum number of files, and this quantity is exceeded, the plugin clears the uploads.

It should only show the error message and keep the files on the screen, otherwise the user understands that the uploads have been cleared.

The fileUpload.reset() is not used.

  <mdb-file-upload [maxFileSize]="1" [acceptedExtensions]="'image/*, video/*'" [multiple]="true" 
[maxFileQuantity]="2"
[formatError]="'Arquivo possui formato incorreto (permitidos(s) .jpeg, .jpg, .png, .webp, .mp4)'"
[mainError]="'Ops, algo deu errado.'" [defaultMsg]="'Clique Aqui ou Arraste e solte uma imagem/video'"
[previewMsg]="'Arraste e solte uma imagem/video aqui ou Atualize'" [removeBtn]="'Remover'"
(fileAdded)="onFileAdded($event)" (fileRemoved)="onFileRemove($event)"
(uploadError)="onUploadError($event)"></mdb-file-upload>

  onUploadError(event: File) {
console.log('UploadError: ', event);
console.log('UploadError files: ', this.filesUpload);

}

file-upload show image files file-upload-error-clear-images



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 9.0.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No