Satya's avatar
Level 1

Laravel

Uploading large file in laravel

0 likes
8 replies
Satya's avatar
Level 1

Uploading large file in laravel

Snapey's avatar

Top marks for your question title!

Do you have an actual question? What do you consider 'large'?

martinbean's avatar

Is it me, or is there an influx of really poorly-asked questions lately?

1 like
36864's avatar

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".

rumm.an's avatar

"do my homework for me".

Haha! seriously.

pardeepkumar's avatar
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.