Apply attachment size setting to asset photo upload validation
This commit is contained in:
@@ -14,7 +14,11 @@ class AssetPhotoController extends Controller
|
||||
{
|
||||
$data = $request->validate([
|
||||
'photos' => ['required', 'array'],
|
||||
'photos.*' => ['image', 'mimes:jpeg,png,jpg,webp', 'max:4096'],
|
||||
'photos.*' => [
|
||||
'image',
|
||||
'mimes:jpeg,png,jpg,webp',
|
||||
'max:' . (config('system.asset.attachment_max_size_mb', 20) * 1024),
|
||||
],
|
||||
]);
|
||||
|
||||
$stored = 0;
|
||||
|
||||
Reference in New Issue
Block a user