OneupUploaderBundle
A Symfony bundle providing a server-side backend for popular JavaScript file-upload frontends
Repository Health
Technical Analysis
OneupUploaderBundle is a Symfony bundle that supplies the server-side implementation for handling single and multiple file uploads. It works out of the box with popular JavaScript upload libraries including FineUploader, jQuery File Upload (blueimp), Plupload, Dropzone, YUI3 Uploader, Uploadify, FancyUpload, and MooUpload.
The bundle handles the tricky parts of upload processing for you: chunked and resumable uploads, orphan file management, per-mapping configuration, validation events, and pluggable storage via the local filesystem, Gaufrette, or Flysystem. You configure named upload endpoints, and the bundle exposes controllers and routes that your chosen frontend posts to.
What You Get
- Ready-made controllers and routing for many JavaScript upload frontends
- Chunked and resumable upload handling with reassembly
- Pluggable storage via local filesystem, Gaufrette, or Flysystem
- An orphanage for managing files uploaded before their parent entity exists
- Validation and lifecycle events (e.g. pre-upload, post-upload, post-persist) to hook custom logic
Common Use Cases
- Wiring a Dropzone or FineUploader frontend to a Symfony backend without writing upload controllers
- Accepting large files via chunked, resumable uploads
- Storing uploads on S3 or other remote backends through Gaufrette or Flysystem
- Validating uploads (size, MIME type) and reacting to them via events
Under The Hood
Architecture - The bundle wires named upload mappings through a Symfony DI extension (src/DependencyInjection) into controllers (src/Controller) exposed by dynamic routing (src/Routing). Each supported frontend has an adapter that normalizes its request shape, while the Uploader namespace handles chunk reassembly, naming, storage, and the orphanage. Processing emits events defined in UploadEvents (src/UploadEvents.php) so applications can validate or post-process files via EventListeners.
Tech Stack - PHP ^8.0 packaged as a symfony-bundle with PSR-4 autoloading under Oneup\UploaderBundle. It builds on Symfony framework-bundle, finder, mime, asset, translation, and event-dispatcher contracts (^6.0 | ^7.0 | ^8.0) plus Twig. Optional storage integrations use knplabs/gaufrette or Flysystem via oneup/flysystem-bundle.
Code Quality - The source is organized by concern (Controller, Uploader, Event, EventListener, Routing, Templating, Twig) and validated with a PHPUnit suite under tests/ that boots a test kernel, plus PHPStan static analysis and php-cs-fixer for style.
API Design - Most integration is declarative: configure a mapping and point your frontend at the generated endpoint. Extensibility comes through well-named lifecycle events rather than subclassing, and the storage abstraction lets teams switch from local disk to cloud storage by configuration alone.