BlazorInputFile
BlazorInputFile copied to clipboard
can't reset the stream
After reading the file e.g. CountLines(), I can't reset the stream with .Position, CanSeek is false. Any workaround?
similar to this, is there a way to simply reset the control? dispose of the stream/IFileListEntry[] on the input so it'll read as if 'No file chosen' again?
Having the same problem here. Did anyone find a solution? Thanks.
I consider this more of a hack than a solution, but the wrapper I wrote for inputfile has an OnReset method, which shows a 'Reset' button, you can change the text with ResetButtonName.
There is a Sample page here also, maybe it will help someone:
Source https://github.com/DataJuggler/BlazorFileUpload
Nuget: DataJuggler.Blazor.FileUpload
@oscardeharo I copied the file to a memorystream, that worked well.