- Does UniSharp Laravel Filemanager support Laravel 10+ and PHP 8.x?
- The package officially supports Laravel 5.x and PHP ≥5.4, which may cause compatibility issues with Laravel 10+ or PHP 8.x features like attributes or enums. Test thoroughly, especially if using intervention/image v4 (PHP 8.3+). Consider forking or waiting for an update if critical for modern Laravel.
- How do I integrate this with CKEditor or TinyMCE in a Laravel app?
- Use the provided JS callbacks or iframe embeds. For CKEditor, include the `lfm.js` script and configure the file browser URL (e.g., `/lfm?type=Files`). TinyMCE integration follows similar steps with its file manager plugin. The package’s API endpoints handle file selection seamlessly.
- Can I use this with cloud storage like S3 or DigitalOcean Spaces?
- Yes, the package leverages Laravel’s filesystem drivers, so you can configure it to use S3, FTP, or any other supported disk. Ensure your `config/filesystems.php` is set up correctly and that the storage permissions (e.g., `storage/app/public`) are accessible.
- What are the risks of using intervention/image with this package?
- Intervention/image is required for image processing (resizing/cropping), but it may conflict with other packages using the same library (e.g., spatie/image-optimizer). Test for version compatibility, especially if upgrading to intervention/image v4 (PHP 8.3+). Consider queueing image jobs for high-traffic apps.
- How do I secure file uploads to prevent unauthorized access?
- The package relies on Laravel’s auth middleware and filesystem rules. Ensure your `lfm.php` config restricts access to authorized users only. For APIs, use token-based auth (e.g., Sanctum) or middleware. Validate file types and extensions server-side to block malicious uploads.
- Is there a way to customize the UI or add new file types?
- Yes, the package supports customization via the `lfm.php` config (e.g., branding, allowed file types). For deeper changes, extend the package by publishing assets or overriding views. Check the [Customization docs](http://unisharp.github.io/laravel-filemanager/customization) for details on hooks and events.
- Will this work with a React/Vue frontend or only Blade?
- The package provides RESTful API endpoints for file management, making it compatible with SPAs like React or Vue. Use the API to upload, delete, or list files programmatically. Ensure your frontend handles CSRF tokens (e.g., via Laravel’s `@csrf` meta tag).
- How do I handle large file uploads or optimize performance?
- Adjust PHP’s `upload_max_filesize` and `post_max_size` in `php.ini`. For high traffic, queue image processing jobs (e.g., using Laravel Queues) to avoid timeouts. Monitor storage limits and consider chunked uploads for very large files.
- Are there alternatives to this package for Laravel file management?
- Alternatives include Spatie’s `laravel-medialibrary` (for Eloquent relationships) or `unisharp/laravel-ckeditor` (editor-focused). For cloud storage, consider `spatie/laravel-google-drive-storage`. Evaluate based on your needs: this package excels in WYSIWYG integration and UI, while others may focus on storage or metadata.
- How do I upgrade from an older version without breaking my app?
- Check the [Upgrade Guide](http://unisharp.github.io/laravel-filemanager/upgrade) for version-specific changes (e.g., namespace shifts from `Unisharp` to `UniSharp`). Test thoroughly, especially if using custom events or middleware. Backup your `lfm.php` config and uploaded files before upgrading.