This is my Upload.php
<?php
namespace app\models;
use yii\base\Model;
use yii\web\UploadedFile;
/**
* UploadForm is the model behind the upload form.
*/
class Upload extends Model
{
/**
* @var UploadedFile|Null file attribute
*/
public $file;
/**
* @return array the validation rules.
*/
public function rules()
{
return [
[['file'], 'file'],
[['file'], 'file', 'skipOnEmpty' => false],
[['file'], 'file', 'extensions' => 'jpg'],
[['file'], 'file', 'mimeTypes' => 'image/jpeg'],
[['file'], 'file', 'minSize' => '51200'],
[['file'], 'file', 'maxSize' => '8388608']
];
}
}
This works fine with an image uploaded from a common pc. But with an android smartphone, it fail in mimeTypes and minSize too. The exactly same image!
This happens not with all android smartphones, I think, but with a Samsung S5570I certainly happens.
How do you would start to investigate, please? (My fantasy ended)