-
Need to upload some files in Symfony? Excellent! You've come to the right place!These days, uploading files can be simple... or incredibly complex - with cloud storage, private files, thumbnailing, validation and so much more. So let's tackle... all of it!Understanding basic file uploadingFile uploads in a Symfony formFile (and Image) validationNaming files (unique vs keeping the original name... or both?)Handling/moving uploaded files in an organized wayRendering links to the uploaded filesThumbnailing with LiipImagineBundle"Uploading" files in your data fixturesFlysystem: using a filesystem abstractionUploading files but keeping them privateAdding a download endpoint for "private" filesFancy AJAX uploading with DropzoneStoring files in the cloud (S3)So get into the (Drop)zone and let us upload some serious knowledge to you in this... multipart(.../form-data) tutorial. Ok... better jokes are inside... I promise!
Overview
Syllabus
-
- 01. Setting up with the Symfony Local Web Server
- 02. Uploads, multipart/form-data & UploadedFile
- 03. Where & How to Store the File
- 04. Unique (but not Insane) Filenames
- 05. File Upload Field in a Form
- 06. Centralizing Upload Logic
- 07. File Validation
- 08. Upload Field Styling & Bootstrap
- 09. URL to Public Assets
- 10. The asset() Function & assets.context
- 11. Thumbnailing with LiipImagineBundle
- 12. Image Preview on the Form
- 13. File Uploads & Data Fixtures
- 14. Flysystem: Filesystem Abstraction
- 15. Using the Filesystem
- 16. Flysystem: Streaming & Defensive Coding
- 17. Flysystem