Topic: Problem with "getInputFiles" property in React MDB File Upload Plugin

Alban B. priority asked 1 year ago


Expected behavior

After calling "getInputFiles={(files) => setExcelFile(files)", on successful upload, the uploaded file should no longer persist inside the Plugin and/or the "getInputFiles" should not call the setState more than once.

Actual behavior

The uploaded file remains inside the Plugin component, triggering the "getInputFiles={(files) => setExcelFile(files)" call infinitely and blockin the app, unless manually removed by calling the remove event.

Resources (screenshots, code snippets etc.)

 <MDBFileUpload
                          acceptedExtensions="application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                          label="Xls Upload"
                          id="upload"
                          maxFileQuantity={1}
                          getInputFiles={(files) => setExcelFile(files)}
                        />  

Wojciech Staniszewski staff commented 1 year ago

We will take a look at this problem. The fix will be available soon (probably next release).



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: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 2.4.0
  • Device: Laptop
  • Browser: Google Chrome (Build 104.0.5112.81)
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: No