change file limitation logic
This commit is contained in:
@@ -15,7 +15,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
$this->configureFileUploads();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,4 +47,14 @@ class AppServiceProvider extends ServiceProvider
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
protected function configureFileUploads(): void
|
||||
{
|
||||
$maxFileSizeKilobytes = (int) config('chat.attachments.max_file_size_kilobytes');
|
||||
|
||||
config([
|
||||
'livewire.temporary_file_upload.rules' => ['required', 'file', 'max:'.$maxFileSizeKilobytes],
|
||||
'livewire.temporary_file_upload.max_upload_time' => (int) config('chat.attachments.livewire_max_upload_time'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user