-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
File uploads file size limitations #28306
Conversation
@Kevin-Andrew ... Look again. On the latest commit, I seek to explain what happened back in 5.0 to help the reader understand what aspect was introducing the limit and when. ... and I'm adding one more NIT update. I may further revise before Monday. What I did this morning was tossed in very quickly (Hey! It's Saturday! 🤣). It's a bit rough in first draft state. ... and one more 😄 ... I must place my reference source NOTE in this. We link to the |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
@Kevin-Andrew ... I made updates to distinguish between read and upload. |
Do you want to drop the ...
... suggestion? I actually think that's kind'a obvious these days. I didn't know if that would be helpful to you in gauging interest or not. |
Since we could not deliver it on all browsers yet I would not lure people. |
Yes ... I just killed both links. I think I'll keep a tracking item (not issue) on my .NET 8 tracking issue to see how it plays out and what needs to change here, if anything. UPDATE: Done! ... It's tracked now. |
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.
LGTM
Thx @pavelsavara! 🎸 ... I'll see if Mackinnon has any feedback on it before merging. @danroth27 ... We eliminated the links to both issues. Now, it just says that a future runtime release may address this. I'm tracking via the .NET 8 docs tracking issue to see how it plays out later. |
|
||
The maximum supported file size for the <xref:Microsoft.AspNetCore.Components.Forms.InputFile> component is 2 GB. | ||
|
||
To resolve the file size read limitation, we recommend implementing file uploads entirely in JavaScript by [streaming requests with the Fetch API](https://developer.chrome.com/articles/fetch-streaming-requests/). |
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.
@javiercn @SteveSandersonMS Is this the right recommendation givent he current level of browser support? Firefox and Safari don't support this yet, right? If you want to support all browsers I believe you need to do some sort of file chunking that you coordinate with the server, correct?
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.
Not sure. Which specific browser support limitation are you referring to?
I see that WritableStream is usable on current Safari/Firefox. Is that sufficient for being able to do an arbitrary-length streaming upload, or is there some other limitation we face?
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.
FF and Safari don't support it yet. See dotnet/runtime#36634 (comment)
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.
Shall I comment-out the recommendation for now and open a tracking issue on the Safari and FF issues (and the following are just for positions) ...
- Fetch streaming upload WebKit/standards-positions#24
- fetch streaming upload mozilla/standards-positions#663
When I detect that Safari and FF have support, I can surface this sentence.
I have an existing tracking remark on my .NET 8 issue to keep an eye on runtime support. When that happens, I can remove all of the size limitation remarks for future versions of this content.
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.
I'm commenting-out the line for now and will revisit this line for the .NET 8 release ... and also to keep an 👁️ on Fetch streaming support for FF/Safari. This is tracked by my .NET 8 tracking issue.
@guardrex , thanks. On a side note, out of my own curiosity, when you merged this PR, did you do a Squash Merge? I looked at the main branch and it appears to only have one actual commit, versus the 15 that were done here. |
Squash for this PR, yes ... but for our merges to One of things that that helps with you know is keeping the history lighter. It also gives us as doc authors the right amount of "credit" in terms of working here for management's tracking. We get the commit credit for the PR, not for all of the churn on a PR. |
Fixes #27680
Thanks @Kevin-Andrew! 🚀
Internal Review Topic (links to section)
InputFile
component.BrowserHttpHandler
is internal, it isn't in the API docs. Therefore, I'm going to code-fence it and supply the reference source link so that interested devs can track it down.❓ ...
Mackinnon/Pavel ... On one issue (dotnet/aspnetcore #31873), Javier recommended Streaming requests with the fetch API; however, on another issue (dotnet/aspnetcore #35899), he recommended HTTP Ranges. This PR currently only has the HTTP Ranges suggestion. Do you want me to swap that for streaming fetch API or add streaming fetch API as another alternative? I understand that it isn't available for Safari and FF yet, so I'd need to work that in and then have a follow-up issue on hold to revise it later.
Pavel ... I specifically mention that devs can add a 👍 to the runtime issue (dotnet/runtime #36634) because it's merely marked "Future" at this time and you might have interest in gauging feedback for possibly placing it on the .NET 8 roadmap. Do you want me to strike the 👍 suggestion part of that and just leave the cross-link? I think at least the cross-link should be here because otherwise devs will think that the PU isn't aware of the problem/suggestion. I think we can curtail folks opening more issues on either the ASP.NET Core or runtime repos if we at least mention the issue. However, we can strike the 'you can add a 👍' part if you like.
Cross-references: