This blog series has shown you how to upload files using ASP.NET Core. You have learned how to style the HTML file upload control and how to upload a file to the server. You uploaded additional information with the file using a view model class. You checked for just specified file types and validated that only those types were uploaded. Finally, you uploaded images and created thumbnail images. In this blog post you are going to set a limit on how large a file can be uploaded.)
Previously in this blog series, you learned to style the HTML file upload control, upload a file to the server, use a view model class to upload additional information with the file, and to validate the type of files that can be uploaded. In this post you learn to upload a photo and create a thumbnail version of that photo. The thumbnail version of a photo can be used when displaying a list of photos to a user. Using a smaller version of the photo keeps your web pages smaller and faster to load. You can then allow the user to click on one of the photos to display the large version.)
Previously in this blog series, you learned how to style the HTML file upload control and how to upload a file to the server. You then learned to upload additional information with the file using a view model class. In this blog post you learn to set the file upload control's dialog to just look for certain file types. You also learn how to validate the file that is uploaded to make sure only certain types are allowed to be uploaded.)
In part 1 of this blog post series, you learned how to style the HTML file upload control and how to upload a file to the server. In this post you are going to see how to upload additional information with the file using a view model class. You are going to start out using a very simple view model class just so you get the basics down. Then you use a file upload base view model class and inherit from this class to upload a file and copy it to the file system on the web server. This prepares you to inherit from this base class later and store the uploaded file to a SQL Server or other type of database.)
User's frequently want the ability to upload files to a website. If you are using ASP.NET Core/8 with MVC and Bootstrap 5.x, you know that the normal file upload control does not look like the rest of your Bootstrapped controls. In this blog post you are going to learn how to modify the default look and feel with a couple of other looks to make the file upload control match the rest of the bootstrap styled HTML. In addition, you learn the very basics of uploading a file to a server.)
In this blog post, you are going to code a web page that allows a user to select one or many files, and display a title and description input area for each file. Once the user adds a title and a description, they click on an Upload button to upload the file selected (see Figure 1), along with the title and the description entered about that file. Each file is uploaded asynchronously through a Web API call and the progress is reported in a progress bar that appears on the web page.)
In this blog post, you are going to learn how to use jQuery, JavaScript, Ajax, and a Web API method to upload multiple files asynchronously. As each file is uploaded, a progress bar is displayed to indicate the progress for each file, as shown in Figure 1. In order to accomplish this, you learn to clone an HTML template for each file selected to upload. Yes, you can find free, open-source libraries to help you do this, but it is always good to know how these things work under the hood.)
In this blog series, you have assumed that everything has gone correctly when uploading files. However, if you attempt to upload a file that is too large, you receive an error from your web server. In this blog post you are going to learn how to get the maximum size of file allowed, display that value on the page, handle an error when the file is too large, and modify the maximum size of file allowed. If you have not done so already, please download the sample from Part 5 so you can follow along with this blog post.)
So far in this blog post series on uploading files with MVC you learned to style the file upload control, use a view model for data binding, create a thumbnail from an uploaded image, and store files on the server's file system. In this post, you learn to store the uploaded file in an SQL Server table. If you have not done so already, please download the sample from Part 4 so you can follow along with this blog post.)
So far in this blog post series on uploading files with MVC you have learned to style the file upload control, to use a view model for data binding, and how to create a thumbnail from an uploaded image. In this post you learn to store the uploaded file in a folder on your server. To accomplish this, there are a few changes you need to make to the application written thus far. You need to add a new setting to the Web.config file, add a property in the AppSettings method to read that setting, and a method to the view model to write the original and thumbnail files to disk. In the controller, call the new method in the view model to write the files. Finally, change the src attribute on image tags to use the path to the folder on the server where the files are located.)
In the last two blog posts in this series you learned to style the file upload control and to use a view model to simplify data binding. In this third blog post, you build a class that allows you to take a large image and create a thumbnail image from it. When displaying a list of files, you may wish to show a small graphic, so the user can see what the file looks like. Instead of sending down a large image and squishing it by setting the height and width attributes, you should use a small graphic as this makes the amount of data sent to the browser less.)
In the last blog post you learned to style the file upload control and to upload a file. You gathered information about the file and placed that information into individual variables in a controller class. In this blog post you create a view model class with properties to hold the file information, and a method to extract the file information, and upload the file.)
User's frequently want the ability to upload files to a website. If you are using MVC and Bootstrap, you know that the normal file upload control does not look like the rest of your bootstrapped controls. In this blog post you are going to learn how to modify the default look and feel with a couple of other looks to make the file upload control match the rest of the bootstrap styled HTML.)
"Sometimes you need to upload some files to your server via an Angular application. There are a few different methods you may use to upload. In this blog post, I am going to present a method that works well for small files, up to about one to two megabytes in size. In this blog you build two projects; a .NET Core Web API project, and an Angular project. You build these two projects from scratch using the Angular CLI, .NET Core and Visual Studio Code editor. The result from this blog post is a page that allows you to select one or more small files using the HTML file input element.)