awcodes / filament-curator

A media picker plugin for Filament Panels.
MIT License
296 stars 79 forks source link

Can't add a video mp4 file with the curator picker #484

Open Cayaf89 opened 1 month ago

Cayaf89 commented 1 month ago

Filament Version

v3.2.79

Plugin Version

v3.5.7

PHP Version

8.2.17

Problem description

When I try to add a video file (.mp4), I get an error : Undefined array key "file"

image

Expected behavior

Have a validation error for the file max_size config instead of the php error.

Steps to reproduce

  1. Create a resource with a form field CuratorPicker
  2. Open Curator modal
  3. Add the video file (with size larger than max_size config)
  4. Click on insert

Reproduction repository

No response

Relevant log output

https://flareapp.io/share/bP9gpDo5#context-request-body
Cayaf89 commented 1 month ago

I found out where my problem was : it was the max_size config that were set to 5000 but i tried to upload a video that is 6Mo

It would be great to have a validation message if the file larger than the max_size instead of this error.

awcodes commented 1 month ago

I'll see what I can find, but the error doesn't match the resolution. I would expect, in this case, a 500 thrown by livewire and not by a filament class. Not sure this is truly related to the plugin itself. Thank you for the feedback back.

xalabama commented 1 week ago

I have tested this setup also and can't confirm that the described behavior happens on upload a file that is bigger than max_size from config. I got a normal validation error message from livewire inside the form. Maybe it helps to share more details about your implementation.