DataJuggler / BlazorFileUpload

This was originally a wrapper of Steve Sanderson's BlazorFileInput. It has since been upgraded to a wrapper of ASP.NET CORE FileInput
32 stars 11 forks source link

Not working #6

Closed rusty-boffin closed 4 years ago

rusty-boffin commented 4 years ago

I'm not sure what's going on. I've created a new Blazor project using BlazorFileUpload v1.2.6, and I've got the following line in my Index.razor file: <FileUpload OnChange="@OnFileUploaded" ShowResetButton="true" AllowedExtensions=".lrq" FilterByExtension="true"></FileUpload> and _Host.cshtml contains: <script src="_content/BlazorInputFile/inputfile.js"></script> <script src="_framework/blazor.server.js"></script>

When the page loads I see the Browse button, and pressing it brings up the file selection dialog, but there's no filtering. When I select a file, the dialog disappears and the filename appears in the text box, but the OnChange event doesn't fire, the file doesn't appear in the Uploads folder, and the Reset button isn't displayed.

DataJuggler commented 4 years ago

The AllowedExtensions should be a semicolon delimited list, so I think for one it is ".lrg;". This filter is an after the fact filter, this doesn't filter the dialog control. This is designed to show a message if a user attempts to upload a file you do not support. Sorry if that wasn't more clear.

As for not working, have you ran the sample in the Samples folder of this project?

I just checked in a new version this morning, and still have some new documentation to add, but it does work. I made some changes yesterday to allow you to custom style the button.

If your project is something you can share, I can take a look if you post the code somewhere.

Sorry you are having problems.

rusty-boffin commented 4 years ago

OK, it does work. I've been using InternetExplorer, but when I switch to Chrome or Edge it all works nicely. Sorry for bothering you with this.

DataJuggler commented 4 years ago

Thanks for the update. I was forced to give up IE a few years ago, even though I am a Microsoft cheerleader since they give me so much free stuff.

I also trust Microsoft more than Google so it was hard.