I have use Yii CuploadFile component in my website,
$uploadedFile = CUploadedFile::getInstance($model, 'cate_image');
however,I can not load my image which 6.5 mb,in this case I have 2 question which I need it now.
what is the largest default size in CuploadFile ?
how can I customize the file size in CuploadFile ?
thankyou very much
Check your upload_max_filesize limit in php.ini file.
- Maximum size of uploaded files isn’t limited by CUploadedFile, it’s limitation of your web server.
PHP Manual: Handling file uploads. Common Pitfalls
About PHP variable upload-max-filesize
- You can limit maximum allowed size of uploaded files in Yii by using CFileValidator in you model validation rules.
thankyou your answer, this helps me understand this problem.