#108070 Ротатор. Сильно пережимаются изображения при загрузке их через обзор - подебажить/отрефакторить
This commit is contained in:
2
File.php
2
File.php
@@ -178,7 +178,7 @@ class File extends \yii\db\ActiveRecord
|
|||||||
$this->ext = $this->file->extension;
|
$this->ext = $this->file->extension;
|
||||||
$this->md5 = md5_file($this->file->tempName);
|
$this->md5 = md5_file($this->file->tempName);
|
||||||
$patch = $this->getDir(true);
|
$patch = $this->getDir(true);
|
||||||
if ($this->isImage)
|
if ($this->isImage && $this->ext != 'jpg') //не конвертируем изображение в jpg если оно уже jpg
|
||||||
{
|
{
|
||||||
$this->ext = $this->convertJpg ? 'jpg' : $this->ext;
|
$this->ext = $this->convertJpg ? 'jpg' : $this->ext;
|
||||||
$this->name = $this->getFileName();
|
$this->name = $this->getFileName();
|
||||||
|
Reference in New Issue
Block a user