Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: File Input - Upload method fails in try block

itdev pro asked 6 years ago


Following your example here: https://mdbootstrap.com/angular/components/inputs/#file-input - If we don't comment out lines 234-237 of mdb-uploader.class.ts, the code fails on line 235. Debugging it, it seems that 'this.uploads' is an empty array, and furthermore, 'uploadIndex' is -1. This causes execution to halt which prevents the xhr request from being sent. These are the lines we had to comment out:
const uploadIndex = this.uploads.findIndex((upload: any) => upload.file.size === uploadFile.size);
if (this.uploads[uploadIndex].file.progress.status === UploadStatus.Canceled) {
  observer.complete();
}
Would it be possible to have a fix for this in a future release so we don't have to manually alter your code?

Damian Gemza staff commented 6 years ago

Dear itdev, We'll take a deeper look on this, and we'll try to fix this in our next releases. Best Regards, Damian

itdev pro commented 6 years ago

Thanks


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags