1. Introduction
This book is a comprehensive guide to handling file uploads with the Laravel PHP framework. Laravel makes the process of handling file uploads incredibly simple, but before long you may find yourself looking to handle more complex upload scenarios. That's where this book comes in.
1.1. What you'll learn
This book covers:
- Creating a HTML form with a file input field
- Storing uploaded files on the local filesystem
- Retrieving and displaying uploaded files
- Using the Storage facade
- Uploading files to Amazon S3
- Implementing presigned POSTs to upload directly to S3 from the client
- Displaying a real-time progress bar during the upload
- Previewing files prior to upload with JavaScript and HTML5
- Enabling users to drag and drop files
- Handling multiple files
- Restricting what users can upload with S3 policies
1.2. Pre-requisites
This book is about a very specific subject. It assumes that you are at least familiar with the following:
- PHP
- Laravel routes, config and Blade templates
- Running a Laravel app locally (using Valet, Homestead or another Web server configuration)
- Basic HTML and JavaScript
To follow the Amazon S3 chapters, you'll need an Amazon Web Services (AWS) account, and a user with an access key and secret that can be used to work with Amazon S3.
1.3. Feedback, Errata and Questions
The author of this book is Joe Lennon. You can find him on Twitter @joelennon or by email at [email protected].