Cmultiple file upload validator probelm...about max file size and numbers

Dear all…

I am a little confused about this: Does the following code means the user can upload 500M files or 50M files in total?


                        array('files', 'file','types'=>'jpg, gif, png, jpeg, pdf, ppt, doc, docx, xls, xlsx, pptx, zip, rar, txt, bmp, tif, tiff, rtf, tar, tar.gz',

                    'on'=>'update',

                     'allowEmpty' => true,

                    'maxSize'=>1024 * 1024 * 50, // 50MB

                    'maxFiles' => 10,

                    'tooLarge'=>'File(s) in this note is larger than 50MB. Please upload a smaller file(s).'

),

So the limit size for ALL FILES are 50*10=500? or just 50?

Thanks!!

Judging by the source code, it’s the limit per file:

https://github.com/yiisoft/yii/blob/1.1.11/framework/validators/CFileValidator.php

The validateFile() method is where the size is checked, and this is called once for each file by the validateAttribute() method.

Thanks for your help! that is quite helpful :lol: