fix: mim type audio and video
This commit is contained in:
@@ -14,7 +14,7 @@ protected function modelClass(): string
|
||||
protected function fileFields(): array
|
||||
{
|
||||
return [
|
||||
'sound' => ['column' => 'sound_path', 'folder' => 'background-sounds/sounds', 'rules' => 'nullable|mimes:mp3,wav,ogg,flac|max:102400'],
|
||||
'sound' => ['column' => 'sound_path', 'folder' => 'background-sounds/sounds', 'rules' => 'nullable|file|extensions:mp3,wav,ogg,flac,aac,m4a,opus,mpga,wma|max:102400'],
|
||||
'image' => ['column' => 'image_path', 'folder' => 'background-sounds/images', 'rules' => 'nullable|image|max:8192'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ protected function modelClass(): string
|
||||
protected function fileFields(): array
|
||||
{
|
||||
return [
|
||||
'sound' => ['column' => 'sound_path', 'folder' => 'bells/sounds', 'rules' => 'nullable|mimes:mp3,wav,ogg,flac|max:51200'],
|
||||
'sound' => ['column' => 'sound_path', 'folder' => 'bells/sounds', 'rules' => 'nullable|file|extensions:mp3,wav,ogg,flac,aac,m4a,opus,mpga,wma|max:51200'],
|
||||
'image' => ['column' => 'image_path', 'folder' => 'bells/images', 'rules' => 'nullable|image|max:8192'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public function store(Request $request)
|
||||
'image' => 'nullable|image|max:8192',
|
||||
'duration' => 'nullable|integer',
|
||||
'is_premium' => 'nullable|boolean',
|
||||
'file' => 'nullable|mimes:mp3,wav,mp4,mov|max:512000',
|
||||
'file' => 'nullable|file|extensions:mp3,wav,ogg,flac,aac,m4a,opus,mpga,wma,mp4,mov,m4v,webm,mkv,avi,3gp|max:512000',
|
||||
'external_url' => 'nullable|string',
|
||||
'visibility' => 'nullable|in:public,private',
|
||||
|
||||
@@ -478,7 +478,7 @@ public function update(Request $request, $id)
|
||||
'image_id' => 'nullable|exists:images,id',
|
||||
'image' => 'nullable|image|max:8192',
|
||||
'duration' => 'nullable|integer',
|
||||
'file' => 'nullable|mimes:mp3,wav,mp4,mov|max:512000',
|
||||
'file' => 'nullable|file|extensions:mp3,wav,ogg,flac,aac,m4a,opus,mpga,wma,mp4,mov,m4v,webm,mkv,avi,3gp|max:512000',
|
||||
'external_url' => 'nullable|string',
|
||||
'visibility' => 'nullable|in:public,private',
|
||||
'tags' => 'nullable|array',
|
||||
|
||||
@@ -134,7 +134,7 @@ public function store(Request $request)
|
||||
$data = $request->validate([
|
||||
'title' => 'required|string|max:255',
|
||||
'artist' => 'nullable|string|max:255',
|
||||
'file' => 'required|mimes:mp3,wav,ogg,flac|max:20971520',
|
||||
'file' => 'required|file|extensions:mp3,wav,ogg,flac,aac,m4a,opus,mpga,wma|max:20971520',
|
||||
'type' => 'nullable|in:public,private',
|
||||
'image_id' => 'nullable|exists:images,id',
|
||||
'image' => 'nullable|image|max:8192',
|
||||
@@ -238,7 +238,7 @@ public function update(Request $request, $id)
|
||||
'title' => 'nullable|string|max:255',
|
||||
'artist' => 'nullable|string|max:255',
|
||||
'type' => 'nullable|in:public,private',
|
||||
'file' => 'nullable|mimes:mp3,wav,ogg,flac|max:20971520',
|
||||
'file' => 'nullable|file|extensions:mp3,wav,ogg,flac,aac,m4a,opus,mpga,wma|max:20971520',
|
||||
'image_id' => 'nullable|exists:images,id',
|
||||
'image' => 'nullable|image|max:8192',
|
||||
'duration' => 'nullable|integer|min:1',
|
||||
|
||||
Reference in New Issue
Block a user