-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try to import a file larger than 1MB, a validation error will occur. #12842
Comments
check config/livewire.php -> temporary_file_upload -> 'max:...', |
I tried it, but it didn't work. |
File Upload size validation is handled by the minSize and maxSize functions on the form component: https://filamentphp.com/docs/3.x/forms/fields/file-upload#file-size-validation This is because FilePond, the JS package used for file uploads, has its own validation for file size that filament hooks into. However, with the FileUpload component being baked into the Import Action, there's no easy way to modify these values yourself. The max filesize should automatically be set to null if it isn't provided automatically, which would make me assume that any size would work. Can you check your Where values are set within the blade component
Where the FileUpload component is made in the ImportActionfilament/packages/actions/src/Concerns/CanImportRecords.php Lines 80 to 83 in 81949c0
|
Thank you for your reply. I have already checked the same points. Since |
So, does this mean that currently in the importer, we can't set |
Package
filament/filament
Package Version
v3.2.80
Laravel Version
v11.7.0
Livewire Version
v3.4.12
PHP Version
PHP8.3.7
Problem description
If you try to import a file larger than 1MB, a validation error occurs and the import fails. This is likely a validation error on the front end from Livewire or Filepond, but the exact cause is unclear.
This occurs when a file is selected or dragged and dropped.
The importer has a feature to specify the maximum number of rows with
maxRows()
, but there is no feature to specify the file size. It would be very useful to have control similar to amaxSize()
feature.Please consider this.
Expected behavior
Should be imported
Steps to reproduce
On the /admin/patients screen, perform the import using ./storage/export-1-patients_over1M.csv.
Reproduction video:
2024-05-17.23.47.40.mov
Reproduction repository
https://github.com/bzy107/filament-select-bug
Relevant log output
No response
The text was updated successfully, but these errors were encountered: