I have my website hosted at a shared server. The maximum upload limit is 5MB. All the validations and file uploading works fine if the uploaded file is under 5MB. But when a file greater than 5MB is uploaded, i see this . How can I validate or force the file to be under the upload limit from server?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You can use Laravel validation rules:
You can read more about validation and its usage.
The 5 mb limitation is set by your webhost and likely cannot be changed.
To upload files larger than the limit you will have to upload it in parts.
A laravel package that does so: https://github.com/jildertmiedema/laravel-plupload