File upload - Division by zero

If I set imageResizeTargetHeight:
Forms\Components\FileUpload::make('image')
->imageResizeTargetHeight('400')
Forms\Components\FileUpload::make('image')
->imageResizeTargetHeight('400')
it gives me error: Division by zero View: vendor/filament/forms/resources/views/components/file-upload.blade.php Could you put me on the right way to solve this issue?
2 Replies
Dennis Koch
Dennis Koch9mo ago
Did you also restrict this to image uploads? Or can you upload a CSV to this? Maybe share the Flare link as mentioned in #✅┊rules
phphelloworld
phphelloworldOP9mo ago
Thanks for your time. I find out that the problem is that I must specify both height and width. With previous version it was not mandatory.
Forms\Components\FileUpload::make('image')
->imageResizeTargetHeight('800')
->imageResizeTargetWidth('1920')
Forms\Components\FileUpload::make('image')
->imageResizeTargetHeight('800')
->imageResizeTargetWidth('1920')

Did you find this page helpful?