No video

Simple File API Using Azure Blob Storage (running locally)

  Рет қаралды 8,793

Milan Jovanović

Milan Jovanović

3 ай бұрын

☄️ Master the Modular Monolith Architecture: bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code: / milanjovanovic
How can you build a simple file API on Azure? You can use the Azure Blob Storage service. It comes with a pre-built SDK, which is available as a NuGet package. In this video, I'll show you how to run Azure Blob Storage locally in a Docker container. Then, we will build a simple file API to upload, download, and delete files from Azure Blob Storage.
Check out my courses: bit.ly/3PupkOJ
Join my weekly .NET newsletter:
www.milanjovanovic.tech
Read my Blog here:
www.milanjovanovic.tech/blog
Chapters
0:00 How

Пікірлер: 37
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@ferventurart
@ferventurart 2 ай бұрын
Great video Milan!
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Thanks a lot!
@user-re6bu7dy1l
@user-re6bu7dy1l 3 ай бұрын
Decent video, but it doesn't stand out except local emulator. What's really interesting and what I was lookig for when came across the video is showing how to deal with large files upload/download and also how can we make uploading to the blob storage and db transactions (e.g persisting file info) atomic. Maybe, you could cover more in depth work with files and blob storage?
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
What would you consider a large file? You can't make it atomic, theoretically. Any one service in a distributed system can fail. What you can do is implement appropriate compensating actions, based on what failed. Another option I would consider is being "eventually consistent". Let's say, upload to Blob Storage and subscribe to the upload event, to write some stuff to the DB.
@user-re6bu7dy1l
@user-re6bu7dy1l 3 ай бұрын
@@MilanJovanovicTech -What would you consider a large file? I would consider something larger than MaxAllowedContentLength default a large file or a file that exeeds maximum block size for single upload operation (which would require multipart upload). - What you can do is implement appropriate compensating actions, based on what failed. This is a advanced level content type I'm looking for
@yunietpiloto4425
@yunietpiloto4425 3 ай бұрын
Great content as always. Thanks for sharing!
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Much appreciated!
@regestea
@regestea 3 ай бұрын
Thanks for your great contents, I think we need a content to "How do I write a test for Azure blob service"
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Great suggestion!
@sreenidhisalugu6498
@sreenidhisalugu6498 Ай бұрын
Could you please make a video on sending file from angular and storing it locally in azure storage
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Sure
@Ajmal_Yazdani
@Ajmal_Yazdani 3 ай бұрын
Thanks for your share @Milan Jovanović. What should I consider if I have to upload very large (up to 10GB) files?
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Consider uploading directly to Blob Storage with pre-signed URLs
@Ajmal_Yazdani
@Ajmal_Yazdani 3 ай бұрын
@@MilanJovanovicTech Could you please explain more. I believe we need to chunk the file into smaller size and either upload in parallel or something, but something looks not simple here. Thoughts?
@user-re6bu7dy1l
@user-re6bu7dy1l 3 ай бұрын
@@MilanJovanovicTech What about validation and running business logic? What if need to check allowed upload size for the user?
@user-ky1zu4cl9u
@user-ky1zu4cl9u 2 ай бұрын
Great content. Can this be implemented in a dockerized application on a linux server?
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Yes - but I don't think you want to run your own instance of Azurite.
@gorgestv6340
@gorgestv6340 3 ай бұрын
In my practice project, I use a "Cloudinary" ( I think equivalent of Blob) and I save files in this storage and in database I save only paths to this files. What do you mean about this aproach?
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Works like a charm
@moneiz35
@moneiz35 3 ай бұрын
Does Azure Blob Storage can handle rights access for files or is it something we have to implement on web application ?
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
It can
@AcapellaNutella6
@AcapellaNutella6 2 ай бұрын
I did all this, but I do not see "Files" in my swagger document???
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
No idea, it should just "work".
@AcapellaNutella6
@AcapellaNutella6 2 ай бұрын
@@MilanJovanovicTech I just used the classic azure function pattern and did it that way. Kinda gave up on the minimalist approach. Good video tho it showed me how to do what I was trying to do.
@Dragonet17
@Dragonet17 3 ай бұрын
Arek you going to create course about Azure ?
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Unlikely
@tbalakpm
@tbalakpm 3 ай бұрын
Blog -> Blob
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Rofl, that autocorrect 🥲😂 Thanks for saving the day!
@itirush2701
@itirush2701 3 ай бұрын
Please make video microservice 🙏
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Will consider
@harkiratsingh358
@harkiratsingh358 2 ай бұрын
No need of docker , now it runs within visual studio
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
How so?
@i3looi2
@i3looi2 Ай бұрын
This is bad practice for big files. You simply proxy the file through the SERVER/API instead of directly going to blobstorage. If you need to upload GB++ files, you bottleneck bandwith and CPU time for no reason.
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
There's also pre-signed URL so you can hit Blob storage directly
@user-xm7sh3vw8o
@user-xm7sh3vw8o 3 ай бұрын
Unhappy why not modular content
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Have to keep it varied
AZURE BLOB STORAGE - Getting Started | Azure Series
30:21
Rahul Nath
Рет қаралды 4,8 М.
This Is What MassTransit Does to Your Message Broker | RabbitMQ
14:21
Milan Jovanović
Рет қаралды 9 М.
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 41 МЛН
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 10 МЛН
How to Implement API Versioning for Minimal APIs | ASP.NET Core 8
18:11
Milan Jovanović
Рет қаралды 14 М.
Making A WebSocket Server With .NET 8🧑‍💻  [FULLSTACK 2024 VIDEO 1]
18:43
Alex's Dev Den 👨‍💻
Рет қаралды 8 М.
Tmux has forever changed the way I write code.
13:30
Dreams of Code
Рет қаралды 957 М.
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 435 М.
How to Add Health Checks in ASP.NET Core
11:51
Milan Jovanović
Рет қаралды 17 М.
Containerize Your C# Application Easily with the .NET CLI
9:57
IAmTimCorey
Рет қаралды 36 М.
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Рет қаралды 942 М.
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 41 МЛН