FileUpload: Some files are missing when uploading multiple files
uma-ac opened this issue · comments
Package
filament/filament
Package Version
3
Laravel Version
11
Livewire Version
V3
PHP Version
php 8
Problem description
When I upload multiple files, some of the files are missing.
Expected behavior
All the files should be present in the desired folder.
Steps to reproduce
Section::make('') ->relationship('result_files') ->schema([ FileUpload::make('attachments') ->columnSpan(12) ->multiple() ->maxSize(100000) ->disk('uploads') ->directory('result_files') ->acceptedFileTypes(["application/pdf"]) ->getUploadedFileNameForStorageUsing(function ($file): string { $fileName = str($file->getClientOriginalName()); $fileName_str = preg_replace('/[^a-zA-Z0-9.]/','',iconv('UTF-8', 'ASCII//TRANSLIT', $fileName)); return (string) str($fileName_str)->prepend(now() . '-'); }) ->downloadable() ->rules([ new MalwareFile] ) ->label(__('application.resource.result_documents')) ]),
FileUpload::make('attachments') ->columnSpan(12) ->multiple() ->maxSize(100000) ->disk('uploads') ->visibility('private') ->directory('application_files') ->getUploadedFileNameForStorageUsing(function ($file): string { $fileName = str($file->getClientOriginalName()); $fileName_str = preg_replace('/[^a-zA-Z0-9.]/','',iconv('UTF-8', 'ASCII//TRANSLIT', $fileName)); return (string) str($fileName_str)->prepend(now() . '-'); }) ->downloadable() ->rules([ new MalwareFile] ) ->label(__('application.resource.application_documents')),
livewire.php
'temporary_file_upload' => [ 'disk' => 'tmp', // Example: 'local', 's3' | Default: 'default' "rules" => "file|mimes:pdf,jpg,jpeg,png,doc,docx,svg,mp4,mp3 | max:100000", // 'rules' => 'max:100000', // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB) 'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp' 'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1' 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs... 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', 'mov', 'avi', 'wmv', 'mp3', 'm4a', 'jpg', 'jpeg', 'mpga', 'webp', 'wma', 'pdf' ], 'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated... ],
Reproduction repository (issue will be closed if this is not valid)
https://github.com/guma-005/Filament-issue.git
Relevant log output
No response
Donate 💰 to fund this issue
- You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
- 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
- Thank you in advance for helping us make maintenance sustainable!
Please provide a non-empty reproduction repository.
updated repository
Please attach the files you were uploading and explain what disk you use