From ec708b5399a2e11f6b94203cef3eea9f35a81733 Mon Sep 17 00:00:00 2001 From: marina Date: Wed, 28 May 2025 14:42:00 +0300 Subject: [PATCH] ERP-417 --- erp24/records/Images.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erp24/records/Images.php b/erp24/records/Images.php index 9463eebe..67210757 100644 --- a/erp24/records/Images.php +++ b/erp24/records/Images.php @@ -80,7 +80,7 @@ class Images extends \yii\db\ActiveRecord $ar_size = !empty(getimagesize($file_obj->tempName)) ? getimagesize($file_obj->tempName) : ['', '']; $ar_file_name = explode('.', $file_obj->name); $ext = '.' . end($ar_file_name); - $file_name = pathinfo($file_obj->name, PATHINFO_FILENAME) . '_' . time() . rand(100,999) . '.' . strtolower(pathinfo($file_obj->name, PATHINFO_EXTENSION)); + $file_name = md5($file_obj->name . rand(100000, 999999)) . $ext; $dir_name = substr($file_name, 0, 2); $uploadDirPath = \Yii::getAlias('@uploads/images'); -- 2.39.5