iperamuna/filament-chunk-upload
Composer 安装命令:
composer require iperamuna/filament-chunk-upload
包简介
Chunked File Upload implementation for Filament 5 Forms
README 文档
README
Filament Chunk Upload
A Filament form component that enables chunked file uploads using FilePond, powered by rahulhaque/laravel-filepond. This package is designed to handle large file uploads reliably by splitting them into smaller chunks.
Requirements
- PHP 8.2+
- Laravel 10+
- Filament 3+ (v5 supported)
rahulhaque/laravel-filepondpackage installed and configured
Installation
You can install the package via composer:
composer require iperamuna/filament-chunk-upload
Ensure you have configured rahulhaque/laravel-filepond according to its documentation.
1. Publish Configuration and Migrations
After installing the package, publish the configuration and migration files:
php artisan vendor:publish --provider="RahulHaque\Filepond\FilepondServiceProvider"
2. Run Migrations
Run the migrations to create the temporary file storage table:
php artisan migrate
3. Configure FilePond
Update your .env file to configure the disk and URL for FilePond:
FILEPOND_DISK=private FILEPOND_TEMP_DISK=local FILEPOND_URL=/filepond
Make sure your config/filesystems.php has a private disk defined if you choose to use it (recommended for secure uploads).
'private' => [ 'driver' => 'local', 'root' => storage_path('app/private'), 'visibility' => 'private', ],
Usage
use Iperamuna\FilamentChunkUpload\ChunkedFileUpload in your Filament resources or forms:
use Iperamuna\FilamentChunkUpload\ChunkedFileUpload; ChunkedFileUpload::make('attachment') ->label('Upload File') ->chunkSize(10485760) // Optional: Set chunk size in bytes (default 10MB) ->directory('uploads') ->visibility('private') ->required();
Features
- Chunked Uploads: Automatically splits large files into chunks based on
chunkSize. - Secure Dehydration: Handles the secure transfer of temporary files to their final destination upon form submission.
- Filament Integration: inherites standard Filament validation and storage configuration (disk, directory, visibility).
Serving Large Files (Secure Download)
Since this package is designed for large files often stored on a private disk, you should use a streamed download response to avoid memory exhaustion (OOM) errors in PHP.
Add a route to your routes/web.php to handle secure, signed downloads:
use Illuminate\Support\Facades\Storage; Route::get('/attachments/{attachment}/download', function (App\Models\Attachment $attachment) { // 1. Verify Signed URL for security if (! request()->hasValidSignature()) { abort(403); } $diskName = config('filament.default_disk', 'private'); // 2. Stream the file to the client // We use streamDownload with manual buffer clearing to prevent memory issues with large files return response()->streamDownload(function () use ($diskName, $attachment) { $stream = Storage::disk($diskName)->readStream($attachment->file_path); // Clear output buffer to prevent OOM if (ob_get_level()) { ob_end_clean(); } fpassthru($stream); if (is_resource($stream)) { fclose($stream); } }, $attachment->file_name); })->name('attachments.download');
You can then generate a download link in your Filament resource or Blade view:
use Illuminate\Support\Facades\URL; URL::signedRoute('attachments.download', ['attachment' => $record->id]);
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
iperamuna/filament-chunk-upload 适用场景与选型建议
iperamuna/filament-chunk-upload 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「filepond」 「filament」 「chunk-upload」 「filament-chunk-upload」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 iperamuna/filament-chunk-upload 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 iperamuna/filament-chunk-upload 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 iperamuna/filament-chunk-upload 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Use FilePond fields in SilverStripe
Upload files using Symfony Form, FilePond, and the rekalogika/file framework
Arikaim CMS Filepond UI library
file upload extension for laravel-admin
Filepond Asset for YiiFramework v.3.0.
Laravel module for the filepond uploads
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-14