Uploading Files to Blazor - The Blazor File Upload Mini Course

Uploading Files to Blazor - The Blazor File Upload Mini Course

IAmTimCorey

1 год назад

29,483 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

John Warrick
John Warrick - 10.11.2023 18:58

Another fantastic series! I am an older guy just now getting into coding. Learning and getting better every time I code, especially when I have a great sensei like Tim Corey!

Ответить
Adrian Gabriel Alexandrescu
Adrian Gabriel Alexandrescu - 04.10.2023 20:54

This is how to map for example <img src="/images/i1.jpg"> to look for another location outside server folder (wwwroot):
In Program.cs / Startup.cs (depending on .net version) add under app.UseStaticFiles() this code :

app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(@"E:\images"),
RequestPath = "/images"
});

Ответить
Barış Güleçyüz
Barış Güleçyüz - 30.07.2023 16:32

Thanks Tim the simplest and most detailed content I've ever seen about fileupload

Ответить
Naveed Khan
Naveed Khan - 22.07.2023 17:26

Nice Sir, i have followed all the steps as in your video but image files uploaded with png and jpg are not opening either these are corrupted or showing blank need help

Ответить
Sharareh Banei
Sharareh Banei - 13.07.2023 13:47

Thanks for your great videos same as always, just I got in stuck with uploading File to Blazor from Azure Blob Storage,more less I did some configuration with that But I have no idea what to do it exactly to work correctly,of course I try to get some suggestions from Chat GPT but it’s answers somehow messy and not so useful for me, Thanks for your replying 🙏

Ответить
Levine
Levine - 24.04.2023 18:12

For some reason accept parameter in InputFile doesn't limit the files extension to filter in Open dialog. Dropdown only lists "Custom Files" and "all Files". Tried ".png,.jpg,.jpeg" and "image/png, image/jpg, image/jpeg". Didn't help. Chrome or Edge - doesn't matter. What is the trick?

Ответить
Nssyr
Nssyr - 17.04.2023 04:30

Thank you Tim! Your video solved my problem. Please don't stop sharing your video with us. I'm really appreciate it!

Ответить
Joel Robinson
Joel Robinson - 22.02.2023 19:56

Very helpful video! I am running into an error where the Directory is created, but the file is not, is there any reason that might happen?

Ответить
Bruce Grodnik
Bruce Grodnik - 21.02.2023 20:21

As always, your tutorials are top notch. Looking forward to progressing in this mini-course.

Ответить
Rocky Marquiss
Rocky Marquiss - 07.02.2023 20:16

May I make a suggestion? In naming the file, use a naming convention that connects it to the data. For example, let's say you're creating a site to allow people to sell their cars and they are uploading pictures of the car they are selling. Making the name of the file with sellerid-year-make-model-color-seq# format for example. If the internal seller id is 0005, it's a 2005 red Ford Mustang it would be 0005-2005-ford-mustang-red-0001.jpg - they'd have to enter the data before doing the upload, the data matches the images and vice versa. While you probably still want a xref table for various reasons this makes the process somewhat self documenting and lends itself to do things like a directory search for 0005-2005-ford-mustang-red* to get all files associated with that entry.

Ответить
Mârko
Mârko - 25.01.2023 10:09

pls also include Excel files later if possible, like parsing Sheets, Columns etc.

Ответить
Sanjay Paudel
Sanjay Paudel - 22.01.2023 05:12

Such a great tutorial. Simple and clear. I've another question that's not related to file upload. You know, we can mix multiple frameworks in a single project. I mean we can use blazor along with MVC.But Just because we can do that should we be doing it? This is what is happening in one of the projects I'm involved in and I'm not quite satisfied with it.

Ответить
Rocky Marquiss
Rocky Marquiss - 20.01.2023 19:56

I understand your reasoning of putting in the return right away, but as a programmer for 41 years I really don't think that is wise. A routine should have one entry point with known parameters and one exit point at all times. I realize that some of this is personal programming style but this can make it more challenging for program modifications down the line. For example, if later they want all possible errors to display - too many files, one too large, etc.. or add the ability to define hard errors (don't process at all) and soft errors (caution user and allow override)? You may have multiple soft errors in a given upload... it's far easier to do when there's one exit point than having to modify a program with multiple exit points... far too easy to get spaghetti code IMO.

Ответить
Halim EMSL
Halim EMSL - 19.01.2023 08:14

Thank you sir, for uploading such a great video on Blazor File uploading. Your explanations were clear and easy to follow, and the examples you provided were extremely helpful. Your video has greatly improved my understanding of this topic and I appreciate the time and effort you put into creating it. Thank you for sharing your knowledge and expertise with the community.

Ответить
Juan Bosco
Juan Bosco - 19.01.2023 07:39

Great! Now how to download files, from our own server and azure storage please

Ответить
Joe Bonez
Joe Bonez - 19.01.2023 04:18

Excellent video. “await using” was new to me, but i now know about IAsyncDisposable :)

Ответить
Max Fedorov
Max Fedorov - 19.01.2023 03:39

Thank you Tim. Such a great lesson.

Ответить
RiGoRmOrTiSUK
RiGoRmOrTiSUK - 19.01.2023 03:11

superb video. thank you for all this content. really happy I managed to get in on the all access pass at Christmas, I'm chewing through your courses and having a blast.

Ответить
A M
A M - 19.01.2023 00:09

Thank you so much Tim!!! Great content as always ;-)

Ответить
Dyako Baram
Dyako Baram - 18.01.2023 18:18

wouldn't be more readable if the new file name code be "var newFileName=Guid.NewGuid()+Path.GetExtension(file.Name);" its much cleaner in my opinion

Ответить
Richard
Richard - 18.01.2023 18:04

You’re just amazing!
But please can you do a quick one on blazor wasm?
I go it to work in development but it doesn’t work in production in blazor wasm!

Ответить
Pro Pro
Pro Pro - 18.01.2023 16:35

thank you

Ответить
Brian Wiggins
Brian Wiggins - 18.01.2023 16:01

Thanks, this is just what I needed.

Ответить