Asp.Net Core API File Upload to Azure Blob Storage

preview_player
Показать описание
Managing files is something that we need to do in almost all of our sytems. But how do we handle ASP.Net Core API File Upload to Azure Blob Storage? I know, it might sound frightening! But it's actually very easy and after watching this video there won't be any secrets anymore!
#aspnetcore #azure #dotnet

Join this channel to get source code access and other perks:

Also follow me here (especially if you are a self taught developer):

Content:
1. Intro: 00:00
2. Initial setup: 01:07
3. Creating DTOs: 02:02
4. FileService constructor: 03:03
5. List available files: 04:45
6. Uploading files: 05:32
7. Downloading and deleting files: 07:14
8. Implementing controller actions: 09:34
9. Why downloading files is important? 11:08
10. Wiring everything up: 11:53

My setup:
Рекомендации по теме
Комментарии
Автор

Awesome tutorial, quick, simple, and yet covers everything. Brilliant Sir!

this exactly that i want

DurgeshMarathe-zbge
Автор

Awesome tutorial, quick, simple, and yet covers everything. Brilliant Sir!

TheNagyTheater
Автор

Thank you for this brilliant tutorial. In one case I ran into a problem. And that was returning the downloaded file as a "File" from the endpoint. For me it only worked when I finally used Results.File() and not just File in the manner of a static class as you did. Anyways, it worked well and I was glad to have this ressource shared by you to the community 🙏🏼

michaelseeger
Автор

I loove this video, but how can I reuse the code for different containers inside the same storageaccount for dev/prod environment?

annatioxzus
Автор

Hi! Could you please make a video in how to map REST API to your DDD-driven app? For example when PUT/PATCH on some of the resource fields have to invoke some specific business logic, not just validate content length

bookuha
Автор

My God this is excellent thanks man great job

bongbuincyril
Автор

Great Video - what IDE are you using?

tobor
Автор

If you put the URI of the file on browser (from response body), it would show it? that means, that you could use it on a web page html?

danielrdm
Автор

Can you make video on how to get the current uploading or downloading percentage for this? e.g. 10% uploaded, 90%, 100%. Currently its only await blobClient.UploadAsync(filePath, true); so i cannot get percentage from it.

hrishikeshgarud
Автор

How easy is to authenticate users from database table ?

DChristop
Автор

Can you please share video for Azure AD authentication to access blob storage ?

siddheshswa
Автор

but how can i upload multiple files at the same time with some data lets say for example the the user will upload some images with captions like
class image
{
string caption;
iformfile image
}

can i just do that
[post] async upload (list<image> images)
or
class userImages
{
string userid;
list<image> images
}
[post] async upload (userImages userImages)

AhmedMohammed
Автор

Excellent tutorial. One question: Is there any safe way to upload the file to Azure Storage directly through the SPA in React, without passing the document through the server? I think of something like this: The SPA obtains a temporary SAS (5 minutes for example) from the server and uses this SAS to upload in the container indicated by the server. What do you think about it?

arthurleite
Автор

thanks brother from another mother nice beard bro

henrik
Автор

should we worry about the size of the uploaded files? will the stream handle that part?

McListenUp
Автор

Just a question here, why use it as a singleton?

nove
Автор

Seems pretty tightly coupled and untestable. WHy didn't you inject the client?

JasonWilson-xqfp
Автор

Make a video on fetching the file with different scenarios(all the files, single file, file with timestamp, file from particular folder etc) as well, that’ll willingly be great. I couldn’t find that type of video on YouTube. Thanks for your content

bloopers