Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue with Multiple File Upload in MudFileUpload Component #9586

@mohammedhassan2

Description

@mohammedhassan2

Things to check

  • I have searched the existing issues for this bug
  • To rule out a caching problem I made sure the bug also happens in an incognito tab

Bug type

Component

Component name

MudFileUpload

What happened?

When trying to upload multiple files at once using the MudFileUpload component, files are uploaded successfully. However, when selecting one file and then trying to select another file and upload them to the server, the following error occurs:

Expected behavior

The issue seems to be related to changing the file list before the previous file operations and uploads to the server are completed. When the system tries to access a file with an old ID, it cannot find it due to the changed file list.

Reproduction link

https://github.com/MudBlazor/MudBlazor.git

Reproduction steps

  1. Open the component containing MudFileUpload.
  2. Select a file.
  3. After uploading the first file, select another file.
  4. Attempt to upload the files to the server.
  5. The above error message will appear.

Relevant log output

thi the error: 
[07T20:06:49.150Z] Error: Microsoft.JSInterop.JSException: There is no file with ID 1. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.
Error: There is no file with ID 1. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.
    at ut (https://localhost:7256/_framework/blazor.web.js:1:38659)
    at Object.readFileData (https://localhost:7256/_framework/blazor.web.js:1:38585)
    at https://localhost:7256/_framework/blazor.web.js:1:3047
    at new Promise (<anonymous>)
    at y.beginInvokeJSFromDotNet (https://localhost:7256/_framework/blazor.web.js:1:3004)
    at gn._invokeClientMethod (https://localhost:7256/_framework/blazor-input-file-multiple-selections.
    at gn._processIncomingData (https://localhost:7256/_framework/blazor.web.js:1:60119)
    at connection.onreceive (https://localhost:7256/_framework/blazor.web.js:1:53760)
    at i.onmessage (https://localhost:7256/_framework/blazor.web.js:1:81866)

Version (bug)

7.6

Version (working)

No response

What browsers are you seeing the problem on?

Chrome

On which operating systems are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions