Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

SharedMemoryFileListEntryStream.ReadAsync() does not return requested bytes #51

Open
mark-at-tusksoft opened this issue Aug 6, 2020 · 0 comments

Comments

@mark-at-tusksoft
Copy link

Relevant info: Blazor-Client WASM app, hosted with asp.net core using identity

I think this may be more of a documentation issue. When calling ReadAsync() on the stream returned by BlazorFileInput OnChange event, I typically never get the number of bytes requested. (i.e. I specify it to read 2MB, it only fills my 2MB buffer with 1MB worth of data). It correctly reports the number of bytes it actually read, but I didn't think that it would consistently under-fill the buffer when there was more data remaining than the buffer size.

I was having a bear of a time wondering why my Azure BlockBlobs were getting uploaded with 5-100% additional size. Don't be careless like me, check the bytes being read and update your buffer accordingly!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant