Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

SymfonyCasts

All about Uploading Files in Symfony

via SymfonyCasts

Overview

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 uploading
  • File uploads in a Symfony form
  • File (and Image) validation
  • Naming files (unique vs keeping the original name... or both?)
  • Handling/moving uploaded files in an organized way
  • Rendering links to the uploaded files
  • Thumbnailing with LiipImagineBundle
  • "Uploading" files in your data fixtures
  • Flysystem: using a filesystem abstraction
  • Uploading files but keeping them private
  • Adding a download endpoint for "private" files
  • Fancy AJAX uploading with Dropzone
  • Storing 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!

Syllabus

  • Setting up with the Symfony Local Web Server
  • Uploads, multipart/form-data & UploadedFile
  • Where & How to Store the File
  • Unique (but not Insane) Filenames
  • File Upload Field in a Form
  • Centralizing Upload Logic
  • File Validation
  • Upload Field Styling & Bootstrap
  • URL to Public Assets
  • The asset() Function & assets.context
  • Thumbnailing with LiipImagineBundle
  • Image Preview on the Form
  • File Uploads & Data Fixtures
  • Flysystem: Filesystem Abstraction
  • Using the Filesystem
  • Flysystem: Streaming & Defensive Coding
  • Flysystem

Taught by

Ryan Weaver

Reviews

Start your review of All about Uploading Files in Symfony

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.