Working with File Uploads
Uploading files is something we do all the time on the web. The web provides built-in support for uploading files. However, uploading and processing files as part of a form submission still requires some additional considerations that we will cover in this chapter. This chapter is split into four sections:
- Using multi-part form data in Remix
- Processing files on the server
- Authorizing access to assets with resource routes
- Forwarding files to third-party services
In this chapter, we will iterate on BeeRich to support file uploads. First, we will update the creation and edit forms to allow adding and removing attachments. Next, we will refactor the action
functions to process the attached files on the server. Further, we will investigate how to authorize access to uploaded files. Finally, we will learn about file size considerations and discuss different file storage solutions.
After reading this chapter, you will understand how...