-
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 to the server #21325
File uploads to the server #21325
Conversation
For Blazor Server until the framework provides goodness at 6.0, what's the correct approach today? ... JS interop downsizing? (sending, too?) ... or just warn readers off of large file sizes (and what is 'large' in these contexts)? Should we pivot the topic between WASM and Server and leave the examples in the topic and on the PR for the WASM pivot (with feedback updates)? If so ... is it ok for WASM examples to use downsized image data at 640x480 max dimensions and |
@pranavkm @javiercn Latest bits on the PR now. ❓ ... Can we leave the base 64 string and thumbnail just for WASM? I'll set up the topic as a WASM-Server pivot, and only the WASM pivot will show it. I'll yank the thumbnail bits (and base 64 string) from the Server pivot. Latest round of hacks 🙈 are on the PR. Hopefully, you won't grind your 🦷 too much looking at it. The approach now is to use |
I would prefer if we don't. It just teaches folks bad practices. You still end up with a huge allocation in wasm and that'll have a negative effect in performance too. |
Fair enough ... it simplifies what I need to do here. We don't need a pivot. I'll strip it out on the next commit. I'll do that right now and ping back in a few minutes. |
Done ... but I still need to go up to the first example and yank that stuff there. I'll update the first example later, tomorrow morning probably. Here's what we have now ... just a list of files. One thing that I need fix. |
I converted the first example over something closer to your, @pranavkm, engineering repo example ... To shorten it generally, I removed the image bits. The images piece also had the base64 string piece that we don't want. I now remove the cross-link to the engineering repo to surface the btw - You have a Ignore the wrong label in the following image. I just fixed it ... Upload up to @maxAllowedFiles files of up to @maxFileSize bytes each: |
To get rid of the pesky rendering problem, I took the |
@EdCharbeneau ... We're dropping the author bylines (dotnet/AspNetCore.Docs #21440) from all topics unless a non-FTE/non-vendor contributor wrote the topic or contributed heavily to it. Of course, you're welcome to make such contributions, and we'll provide a byline under those conditions. |
@pranavkm ... Latest code draft approach is on the PR.
|
Anything else to consider on this one? If not, I'll give it a last look on Friday and get it published. |
Fixes #20323
Internal Review Topic (links to section)
🍖
I'm embracing the same goals for the sample code here that we used when generating the coverage for MVC/RP file uploads in Upload files in ASP.NET Core. Example code only at this point. If we decide to proceed with this sample code and after we firm it up, then I'll work on the text.
On the PR are some 🙈 RexHack'ins™ 🙈 ... prototyped from your, @EdCharbeneau, code along the goals that I lay out below 👇. Coverage of the new section starts on Line 90 of the PR.
@pranavkm, do you want to supply feedback on this, or shall I close this PR in favor of a sample that you provide? If you decide to build the sample, you can link a GH repo in the issue, and I'll generate a new PR from there.
The two high-level goals are ...
The specific scenarios are ...