-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Blazor Server Large File Upload Support #33900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e9a84a3
Prototype Large File Upload Support Blazor
TanayParikh fc45a1d
Blob.slice Implementation
TanayParikh 05c0037
Allow WASM to keep working
TanayParikh 481d564
Merge branch 'main' into taparik/largeFileInterop
TanayParikh c682d19
Update CircuitStreamingInterop.ts
TanayParikh 7d4f8f8
PR Feedback
TanayParikh d3a5ad9
Cleanup
TanayParikh 857f441
Merge branch 'main' into taparik/largeFileInterop
TanayParikh b74b933
PR Feedback
TanayParikh d9e37fb
Merge branch 'main' into taparik/largeFileInterop
TanayParikh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't allocate a buffer larger than ~2GB so this'll fail for large files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this back in for now so this PR isn't blocked on WASM streaming interop. Will remove it in that PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you saying that, as of this PR, we still won't support >2GB files but it will nearly support it and then when you do the WASM piece it will support it on Server too?
If so that's totally fine - just want to check I understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of this PR we'll support >2GB in server and up to the current ~2GB limit in WASM. With the new WASM PR, I have >2GB working in WASM as well (using this
Blob.slice
approach).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TanayParikh where can I find this "the new WASM PR" and information weather Blazor WASAM 6.0 supports >2GB upload or not?
I can't find any documentation or examples on uploading >2GB file in WASM to an API (preferably with progressive information for UI display)? The docs on Blazor file upload doesn´t event mention the <2GB limit
Its totally unclear if this works now in .net 6.0 , just like I think you are pointing out here.
The internet is littered with questions like this and this and no answers.
Hope you can point me in the right direction.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#33986
It does.
The process is the same as you would take to upload files < 2GB. We recently added docs for showing progress for uploads in Blazor server (here), you should be able to use that as guidance for implementing something similar in Blazor WASM.
The 2GB limit in .NET 5 and before was un-intended and un-documented behavior. This has been resolved in .NET 6. I've created an issue to add a notice for this limitation in .NET 5 to the docs. dotnet/AspNetCore.Docs#24381
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for the update. This helped me allot deciding on my next steps