Closed S-DICKSON closed 4 years ago
You can use media collections to restrict file sizes: https://docs.spatie.be/laravel-medialibrary/v7/working-with-media-collections/defining-media-collections/#only-allow-certain-files-in-a-collection
See also spatie/laravel-medialibrary#1643
Hello, that link returns 404.
Is there any specific reason you can not restrict the image size in form request?
https://laravel.com/docs/6.x/validation#rule-size
https://github.com/spatie/laravel-medialibrary/issues/1643
You can also restrict the file size in the form request if you prefer so: https://vanilo.io/docs/1.2/form-requests#customizing-form-requests
Hi, there seems to be no limit on the image upload. Please have a look at my test below where I send a request of a 5gb image and the request is accepted and stores it.
https://github.com/vanilophp/framework/blob/5f5ec185c9afe4c1023c6213314cad31b616595f/src/Http/Requests/CreateMedia.php#L31