Download the PHP package owainjones74/filament-file-upload-chunked without Composer
On this page you can find all versions of the php package owainjones74/filament-file-upload-chunked. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download owainjones74/filament-file-upload-chunked
More information about owainjones74/filament-file-upload-chunked
Files in owainjones74/filament-file-upload-chunked
Package filament-file-upload-chunked
Short Description Filament file uploads with support for chunking
License MIT
Informations about the package filament-file-upload-chunked
Filament Chunked File Upload
📂 Chunked file uploads for Filament PHP 🗄️
This packages allows for chunking file uploads. It's VERY hacky and messy, but it works (I think). I wrote this package to work around the 100MB Cloudflare limit.
https://packagist.org/packages/owainjones74/filament-file-upload-chunked
How to use
- Install the package using
composer require owainjones74/filament-file-upload-chunked
- Import the package inside your Filament Resouce with
use OwainJones74\FilamentFileUploadChunked\Forms\Components\FileUploadChunked;
- If required, publish the javascript file
php artisan filament:assets
. - Replace the built in file upload with the
FileUploadChunked
class inside your form.
Docs
The only additional chained method you can add when defining this component in your schema is ->chunkSize(int|closure)
. This will allow you to set the chunk size in bytes. The default is 50MB.
Things that don't work
- Only a single file is allowed to be uploaded for each UI component.
- The method for pulling the file type is not ideal, some file types may not be supported.
.dmg
files for example just don't work. If you have a suggestion for doing this better, please make a PR! <3
Credits
- This is based on the existing file upload component in Filament, I just added the chunking functionality.
Read the code at your own risk