I'm implementing on Blazor WASM using the examples provided in https://www.syncfusion.com/forums/153253/upload-file-on-editform-submit
I'm using multiple files in my solution.
This works fine unless the user browses for a file twice.
So if I add a file and submit it's fine, if I add multiple files and submit it's fine.
The issue occurs if I browse for a file and then I browse for a file again.
Whilst the list will show both files, $('#files').get(0).files only contains the last file(s) selected and not all files.
It's not the same file a second time. I never noticed the issue initially because I hit the browse button and selected multiple files. However when a non savvy user had a go, their instinctive approach was browse for the file and click add, then browse for another file to add a second file.
This shows 2 files in the list, however the javascript with only find the second file.
My issue is that because the files are part of an add form I need them submitted along with the rest of the details of the form. The workaround of using javascript to build a formdata object and submit the file was working great until I found out you cannot click browse twice.
|
|
Isn't that project a server side blazor? I'm using WASM