27 lines
669 B
PHP
27 lines
669 B
PHP
<?php
|
|
|
|
namespace App\Domains\StorageTest\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreS3TestFileRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, array<int, string>>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'file' => ['nullable', 'file', 'max:10240', 'required_without:file_base64'],
|
|
'file_base64' => ['nullable', 'string', 'required_without:file'],
|
|
'path' => ['required', 'string', 'max:2048'],
|
|
'expires_in_minutes' => ['nullable', 'integer', 'min:1', 'max:1440'],
|
|
];
|
|
}
|
|
}
|