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.)

                          acceptedExtensions="application/, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                          label="Xls Upload"
                          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.


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



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