How to upload Big file in .NET Core

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome guys to this interesting session of asp.net core web API in this session we are going to see how we can upload big file or a huge size of file into our asp.net core web application or web API this will work for both web application and web API guys if you remember I have created so many videos like indeed.net core 7.0 3.1 and 6.0 all file operator and download but few days ago while working with a big project I found that huge file or Big File upload are little bit different configurations so I thought let's share it with you so guys so before starting the session if you are new to my channel hit the Subscribe button and ring the bell icon for future notification and if you ended up liking my video give me a like and share this video with your friends let's get started so these are those 7.0 3.1 and this is 6.0 free video I have created I will give this three video link on video description you can check it out file upload and download this particular asp.net core 7.0 or file upload and download if you come to here more you can download the particular source code here I'm using same source code you can see there are two API upload file and download file samage my this asp.net core 7.0 session so here let's try to upload a huge file so run the application guys I am going to use same source code and going to upload and give the rename it to different one so you can download it two second to upload so you run the application so in the solution we have upload and the files I'm going to open file so here upload file section either try it out let's choose a file so for now I am choosing a thumbnail file yeah yeah I'm going to say something okay for now I'm choosing this one a PNG file and let's execute so we have uploaded our file if you go to solution Expo you can see this PNG file got uploaded right same file now I am going to upload a huge file so if I go to the my file explorer videos this is one of one of my new channel actually I'm going to give the link also please subscribe to the channel so this is this file has okay 993 MB so new to 1GB so let's upload this file choose file web compiled video night one okay execute so you can see strings something Trail to phase possible region course like this why if I'm going to again I am going to some small file selecting is execute it's executing but why not big file let's find it out and let's let's click configure to upload the file it can be done by two way one is locally means one is your controller level or Action level N1 is your complete application Level so we will see first our Action level or controller level then we'll go to our application Library so for Action level actually here you can type like this in in the contraction attribute required size limit I am giving for 2 GB so 2028 and for 1GB I can give like this one zero two four into one zero two four into one zero two four let's say I want to give 500 MB so I can give like this 500 MB into one zero two four into one zero two four so for now I am giving two zero to eight which is 2 GB of file I can upload into my this action okay next step is go to program.cs file inside before Builder dot build you can write like this Builder dot service dot configure home option option extend to option dot multipart body length limit same the formula for 2GB now run the application and see we are going to upload a 993 MB of video file it is offloading or not so this thing we did in locally in Action level and we did in program.cs file go to upload try it out choose file so let's choose the same Knight one dot Avi guy I'm going to upload this night one today and I'm going to give a link surely please please please subscribe my new channel so yes it's near to 1GB it will take few second or a minute guys I'm thinking to place small smooth background music so please give your opinion in comment box if you want to listen smooth background in my videos wow so you can see here the file got offloaded go to our solution Explorer you can see avi file is there done in this way we can upload file huge file but this is we did in locally means in our controller level for now I don't need in controller level I will do com I commented the attribute request size limit now I am going to program.cs file inside this I am going to configure the Castrol so here I am writing Builder dot webhost dot configure Castrol options extend to option limit dot marks request body size same formula for 2GB 2028 into 2021024 into 1024 now you can see I have commented this line now let's try to upload a big file again it is uploading or not so there are two way guys this is remember this is a most important interview question also how can we upload a big file into our applications we can set our attribute so let's upload this execute so we can set in our Action level you can set request size limit attribute and in program program.cs file you can configure the form option to option multi part body length limited there is one way and one way each we need to add this also in for Global and also we need to add this one for Global which is wavehost.comfigure Cash trial where Max request body size equal to that particular file size your max file size you want to upload so let's see yeah it's got uploaded yeah our go to our solution Explorer yeah there are two API file one is locally we uploaded one is globally configured we uploaded so in this way we can upload big file or huge file into our asp.net core web API okay guys here I'm just telling something I have created one more channel for Moto blogging guys please subscribe to this channel very few subscriber and I have posted so many shots and some relaxing music motoblog so please please please subscribe to this channel I will give the link thank you very much
Info
Channel: Biswa Ranjan
Views: 1,123
Rating: undefined out of 5
Keywords: Big file in .NET Core, Big file upload in .NET Core, Huge file in .NET Core, Huge file upload in .NET Core, File upload and download in ASP .NET Core 6.0 Web API, File upload and download in ASP .NET Core 6.0, File upload and download in ASP .NET Core Web API, .NET Core 6.0, .NET Core 6.0 Web API, Learn .NET Core 6.0 Web API, Learn .NET Core 6.0, .NET Core 6.0 Web API Tutorial, .NET Core 6.0 Tutorial, Dot NET Core 6.0, DotNET Core 6.0 Web API, Learn Dot NET Core 6.0
Id: SqhqLDrzzaM
Channel Id: undefined
Length: 8min 50sec (530 seconds)
Published: Fri Sep 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.