Welcome to our Angular File Upload Tutorial. We often need to upload files to our servers from web clients. This could be profile pictures, documents, or any other files. Today we’ll look at how we can do that using Angular.
Sending files to the server usually involves sending an HTTP POST multipart request. In a multipart request, the Content-Type header is set to multipart/form-data, and files are delimited by optional boundary parameters. The actual file is sent as a binary block of data.
This is slightly different than a regular REST post requests where the Content-Type header is usually set to application/json.