Uploading large file in laravel
Laravel
Uploading large file in laravel
Top marks for your question title!
Do you have an actual question? What do you consider 'large'?
This library might be what you are looking for. Give it a shot.
Is it me, or is there an influx of really poorly-asked questions lately?
@martinbean yeah, most of them is like crystal ball contest
My theory is that a university or high school somewhere started including laravel in the curriculum. A lot of the questions I've seen lately look like "do my homework for me".
"do my homework for me".
Haha! seriously.
public function render($request, Exception $exception)
{
if ($exception instanceof\Symfony\Component\HttpFoundation\File\Exception\FileException) {
// create a validator and validate to throw a new ValidationException
return Validator::make($request->all(), [
'your_file_input' => 'required|file|size:5000',
])->validate();
}
return parent::render($request, $exception);
}
in case you face problem read my full article on Multiple file uploading in Laravel
php.ini
You need to set the value of upload_max_filesize and post_max_size in your php.ini :
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M
; Must be greater than or equal to upload_max_filesize
post_max_size = 40M
Please or to participate in this conversation.