Tewr / BlazorFileReader

Library for creating read-only file streams from file input elements or drop targets in Blazor.
MIT License
426 stars 61 forks source link

Seek problem with 64-bit #153

Closed Enfis closed 4 years ago

Enfis commented 4 years ago

Version used: v2.0.0.20200 File: FileReaderJsInterop.InteropFileStream.cs Method: public override long Seek (long offset, SeekOrigin origin)

It incorrectly makes an 'int' cast when seeking using SeekOrigin.Current or SeekOrigin.End, loosing the 64-bit long effect of 'position' parameter and throwing a IOException (working with big files over 2 GiB).

Thank you for this great plug-in ;-)

Tewr commented 4 years ago

Thank you for you feedback. The whole method is based on MemoryStream which is completely unreasonable for a pure stream.