Uploading Files with a JavaScript REST API
This course will teach you what options you have for sending files from client-side web applications to the server. You’ll also learn what to do with them once they’re there.
What you'll learn
Web applications are responsible for managing a lot of different types of data.
Strings of text are used for names and descriptions, dates are used to track what happened when, and numbers are used to quantify and measure an application’s data. Among these data types, files present a unique set of challenges to manage securely and efficiently.
In this course, Uploading Files with a JavaScript REST API, you’ll learn about the options you have for uploading files from the browser to the server.
First, you’ll explore how to handle a single file at a time.
Next, you’ll expand your knowledge by examining how to upload multiple files at a single time.
Finally, you’ll learn how to manage the files once they get to the server.
When you’re finished with this course, you’ll have the skills and knowledge of uploading files with JavaScript needed to choose the most effective option for your use-case and implement it efficiently.
Table of contents
- Introduction 4m
- Uploading Files with HTML Forms 4m
- Demo: HTML Forms 8m
- Styling File Input Elements 1m
- Demo: Styling File Input Elements 5m
- Demo: Uploading Forms with Synchronous XMLHttpRequests 5m
- Demo: Using Asynchronous XMLHttpRequests 5m
- Demo: Tracking Upload Progress 2m
- Demo: Uploading Files with the Fetch API 4m
- Summary 2m
- Introduction 1m
- Methods to Receive Files in ExpressJS 4m
- Demo: Receiving Single Files with ExpressJS 6m
- Demo: Receiving Multiple Files with ExpressJS 3m
- Sending Files to the Client 1m
- Demo: Sending Files to the Client 6m
- Downloading Files in Web Browser 1m
- Demo: Downloading Files with Anchor Tags 3m
- Demo: Downloading Files with the Fetch API 3m
- Summary 2m
Course FAQ
A RESTful API is a stateless, client-side caching API that uses less bandwidth.
Some of the major topics that we will cover include sending files from a web browser using HTML markup and JavaScript, how to receive uploaded files on the server, and finally, you'll learn about the options that the server offers for sending files back down to the client.
Before beginning the course, you should be familiar with HTML and JavaScript, both client-side and server-side.
A basic understanding of ExpressJS, the web framework we'll be using, is helpful, but not required.