Upload Large Size File in ASP.NET CORE C# | #best

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome my channel asp.net core and today I'm going to show you how to upload large file size in esp.net core so this is the simple example in this video tutorial I'm going to add large file size in uh in asp.net core so first of all create a model that is video you know that the video file have have some more content so lots of size and you can say that this is the ID and the video URL and the video title first of all take in as a model also create a view model for your video file and you can say that uh the default size to upload any images any file in asp.net core or any other application without any restriction and without any modifications so you can upload only four MV images 4 MB files in your in your browse file but if you want to increase the size of the file upload control and you want to save the file or upload any file which is larger than the 4mb then you can do this uh do this procedure which is I doing in uh in this video so here we have a view model video view model ID video title and iPhone file a video URL okay so here you can see that the connection string that is the application dbcon context connection and just change the database that is demodb okay okay so everything you know about all the credit operations uh in asp.net core add easily you can do uh upload any image file in asp.net core there is a lot of video available on your internet but uh if you search upload image in asp.net core which is the larger file which is greater than 4 MB then you can then you can choose and you can pick this uh video YouTube video which is uh better than other videos because I explain all these things which is uh in asp.net core that is used in uh in this video so here we have a connection string and by using the connection string just configure that connection string in program.cs file and also create a connections and here we have a controller and HTTP get for the create action method and in the create action method first of all reference The View model that is VM equals to new video controller so here you can see that the video view model and just pass that video view model that is empty viewmodel and you can say that this is the structure only you can just you have to create it when we click on the submit button then you will see that in null value will be passed because a large file will be picked in this video so uh I'm going to say that a video file which is larger than the 4mb that is the default size but if you pick a larger file like uh exceeded the 4mb and you will see that some changes in your uh and you will pass for uh null value in the whole model wait for some times and you will see some differences okay so uh this is the uh generated scaffold generated csstable file create.csystem and ID is not required for uh the Cs system file so iPhone file just convert it uh in the CSS dual file so here esp4 that is a video URL video URL and video URL also some changes in the form that is ANC type multi-part home data as well as method is post just I want to send the informations in the post method so when we click on the submit button that home will be submitted to the post action method and here you can see that uh some changes you have to done it so so here we have a toolbox and you will see that I have already uh I have already added a upload image file code in as a code snippet in the toolbox so there is the two uh image upload uh he must applaud chord like VM dot image URL just replace the image URL with your video URL so just copy that code and paste it here and also paste it here and also some changes uh like just I want to take all the images folder instead of images less employees and you have to create I web host environment to to keep the path of any file and the default web root uh path I mean to say that you have to lock it www folder so upload directory and then file name so just remove the weight keyword because there is a no asynchronous call so video URL dot copy2s Inc and new file stream yeah with the path and file mode is create and the model dot image URL so just add a new model and that means of video model and in which you can take video file and the video URL so just have to add a new model foreign you can see that is already there and the video model dot video URL also add this model into the database table and make some changes in the context so that is okay and so this is the thing you can do so here we have you can see and test your code oops because home is not there to create actually the controller name is videos and you will see that the default is so the default is that I want to pick it and MP4 and just create and you will see that object reference dot set to install object I'm going to say that VM Islam because the file size is too large so stop this thing and increase the size in your program.cs file by using the configure method so add for the cash flow server that is builded dot services dot configure dot configure dot Castrol server option option dot limit dot masked Max request body size is 100 MB so you you can just upload 100 MB content size filter dot if you want to add for the io server options just you can increase the max request to body size is actually is server have not limits uh property so just remove and options dot mask request body size is the same 100 MB for your custom and for your IR server and you can see that your your upload size will increase and you can upload a 100 MB until 100 MB file size and your Sakira song have 47b 39 MB approx so just upload very well that is uploaded already so there is the second time to upload in in this video so here we have two files because I already added previous one okay so just leave it and you can see the upload folder where your Bollywood Sakura have already there two files because I have I have done in it in two times so thank you very much for watching this video and keep watching all other videos which is related to asp.net code
Info
Channel: ASP.NET MVC
Views: 6,652
Rating: undefined out of 5
Keywords: Upload Large File in ASP.NET CORE, ASP.NET CORE FILE SIZE LARGE, BIG FILE SAVE IN ASP.NET CORE, UPLOAD LARGE FILE ASP.NET CORE
Id: OPQJvbGqIoY
Channel Id: undefined
Length: 12min 3sec (723 seconds)
Published: Wed Nov 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.