Symfony bundle for upload functionality with Flysystem support.
composer require backend2-plus/upload-bundle
If you have existing code that uses App\Bundles\Upload\MultipleUploadBundleService, you need to change the import in controllers:
Old:
use App\Bundles\Upload\MultipleUploadBundleService;
New:
use Backend2Plus\UploadBundle\Service\App\Bundles\Upload\MultipleUploadBundleService;
After migration, you can delete old files:
src/Controller/UploadController.phpsrc/Bundles/Upload/ directoryconfig/packages/upload.yaml (old)Bundle provides API endpoint for upload:
POST /api/upload
Backend2Plus\UploadBundle\Service\UploadService - main upload serviceBackend2Plus\UploadBundle\Service\App\Bundles\Upload\MultipleUploadBundleService - service for multiple uploadBundle uses OneupFlysystemBundle for filesystem configuration. You need to configure:
# config/packages/oneup_flysystem.yaml
oneup_flysystem:
adapters:
public_uploads:
local:
directory: '%kernel.project_dir%/public/upload'
private_uploads:
local:
directory: '%kernel.project_dir%/privatePictures'
filesystems:
public_uploads_filesystem:
adapter: public_uploads
private_uploads_filesystem:
adapter: private_uploads
For support contact: [email protected]
How can I help you explore Laravel packages today?