In this lesson, learn how to use the JavaScript FormData
object to send binary file data to a server. Using FormData
mimics traditional HTML form payloads and make it easy to upload files without additional processing. FormData
also automatically sets the appropriate Content-Type header (multipart/form-data) when used with fetch.
Links