Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ux Dropzone

Ux Dropzone Laravel Package

symfony/ux-dropzone

Symfony UX Dropzone adds lightweight drag-and-drop file uploads to Symfony Forms, letting visitors drop files into a container instead of browsing their computer. Part of the Symfony UX initiative.

View on GitHub
Deep Wiki
Context7

File input dropzones for Symfony Forms

Frequently asked questions about Ux Dropzone
Is symfony/ux-dropzone compatible with Laravel?
Not natively. symfony/ux-dropzone is a Symfony UX bundle built for Symfony Forms, so a Laravel app would need Symfony Forms, request bridging, and UploadedFile conversion. It is possible as a custom integration, but it is not a drop-in Laravel package.
How do I install symfony/ux-dropzone in a Laravel application?
You would install it with Composer, but Laravel will not treat it like a typical Laravel package. You must register the Symfony bundle manually, enable Symfony Forms, and wire the front-end assets yourself. For most Laravel projects, using Dropzone.js directly or a Laravel-native upload component is simpler.
What Laravel and PHP versions does symfony/ux-dropzone support?
The package does not publish Laravel version support because it targets Symfony, not Laravel. Its requirements include PHP 8.4+ and Symfony 7.4+, so your Laravel app must meet those constraints and tolerate the added Symfony components. Check compatibility before adding it to an existing Laravel dependency graph.
Can I use Symfony Forms file inputs in Laravel with this package?
Yes only through a custom bridge. You would need to render Symfony Form widgets in Blade, adapt Laravel's Request to Symfony's RequestStack expectations, and register the form type. This adds significant architectural overhead compared with Laravel's native form requests and validation.
How do I handle uploaded files from Symfony UX Dropzone in Laravel?
The package expects Symfony's UploadedFile abstraction, while Laravel controllers and validation use Illuminate\Http\UploadedFile. You would need conversion or adapter logic before storage and validation. Plan this carefully because mismatches can cause runtime errors or failed uploads.
How do I validate drag-and-drop uploads in Laravel when using Symfony UX Dropzone?
Laravel validation rules such as file, mimes, max, and image will not automatically map to Symfony's File constraints. You must either validate in Laravel before passing data into the Symfony layer or duplicate validation rules in both systems. Keep server-side validation authoritative regardless of the drag-and-drop UI.
How do I add the Dropzone front-end assets to a Laravel Vite build?
The package's front-end relies on JavaScript and asset pipeline setup, so you would import its assets or Dropzone.js through Laravel Vite. You also need to configure the upload endpoint, CSRF token handling, and any event listeners for success or error states. Test the ES module setup in production builds, not only in dev.
How do I test symfony/ux-dropzone file uploads in a Laravel or Symfony app?
In Symfony, use the framework's file upload test helpers and assert the form handles uploaded files correctly. In Laravel, you would likely need custom test doubles because Symfony UploadedFile and Illuminate UploadedFile are different classes. Add integration tests for the endpoint, validation, storage, and front-end upload contract.
Is symfony/ux-dropzone production-ready for Laravel apps, and what are the main risks?
The package itself is maintained under Symfony UX, but Laravel use is a custom integration rather than a supported path. Main risks include Symfony/Laravel dependency conflicts, UploadedFile bridging, validation duplication, asset pipeline complexity, and ongoing maintenance of your adapter. Use it only if you already depend on Symfony Forms or have a strong reason to bridge both stacks.
What are the best alternatives to symfony/ux-dropzone for Laravel drag-and-drop uploads?
For most Laravel apps, use Dropzone.js, FilePond, or Uppy directly with a Laravel upload endpoint, or choose a Laravel-native upload package or Livewire file uploads. These avoid Symfony Forms and UploadedFile bridging. Pick based on whether you need simple drag-and-drop, previews, chunked uploads, or tight Blade integration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager