瀏覽代碼

[Backend] Duplicate imgae

develop
Fab 3 年之前
父節點
當前提交
496c5ff32d
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      ShopBundle/Services/UtilsProcess.php

+ 1
- 1
ShopBundle/Services/UtilsProcess.php 查看文件

@@ -93,7 +93,7 @@ class UtilsProcess


if ($entity->getImage() && file_exists($basePath . $entity->getImage())) {
$extension = pathinfo($basePath . $entity->getImage(), PATHINFO_EXTENSION);
$extension = strtolower(pathinfo($basePath . $entity->getImage(), PATHINFO_EXTENSION));

if ($extension == "jpg" || $extension == "png" || $extension == "gif") {
$newImage = md5(uniqid()) . '.' . $extension;

Loading…
取消
儲存