mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
36 lines
827 B
PHP
36 lines
827 B
PHP
<?php
|
|
namespace Domain\Files\Requests;
|
|
|
|
use Domain\Admin\Rules\DisabledMimetypes;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UploadRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'filename' => 'required|string',
|
|
'parent_id' => 'nullable|uuid',
|
|
'path' => 'required|string',
|
|
'is_last' => 'sometimes|string',
|
|
'extension' => 'sometimes|string|nullable',
|
|
'file' => ['required', 'file', new DisabledMimetypes],
|
|
];
|
|
}
|
|
}
|