From fd5c48a47ec59279ca567170d1e3c28104b29836 Mon Sep 17 00:00:00 2001 From: Sasha Rybkin Date: Fri, 31 Jan 2025 15:08:01 +0300 Subject: [PATCH] =?UTF-8?q?#108070=20=D0=A0=D0=BE=D1=82=D0=B0=D1=82=D0=BE?= =?UTF-8?q?=D1=80.=20=D0=A1=D0=B8=D0=BB=D1=8C=D0=BD=D0=BE=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=D0=B0=D1=8E=D1=82=D1=81=D1=8F=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83?= =?UTF-8?q?=D0=B7=D0=BA=D0=B5=20=D0=B8=D1=85=20=D1=87=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B7=20=D0=BE=D0=B1=D0=B7=D0=BE=D1=80=20-=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=D0=B5=D0=B1=D0=B0=D0=B6=D0=B8=D1=82=D1=8C/=D0=BE=D1=82?= =?UTF-8?q?=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D1=82?= =?UTF-8?q?=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/File.php b/File.php index daa5d55..04a3cfa 100644 --- a/File.php +++ b/File.php @@ -178,7 +178,7 @@ class File extends \yii\db\ActiveRecord $this->ext = $this->file->extension; $this->md5 = md5_file($this->file->tempName); $patch = $this->getDir(true); - if ($this->isImage) + if ($this->isImage && $this->ext != 'jpg') //не конвертируем изображение в jpg если оно уже jpg { $this->ext = $this->convertJpg ? 'jpg' : $this->ext; $this->name = $this->getFileName();