xielin лет назад: 5
Родитель
Сommit
65cf7adb2f
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      app/Http/Controllers/UploadController.php

+ 2 - 4
app/Http/Controllers/UploadController.php

@@ -25,9 +25,7 @@ class UploadController extends Controller
                 $width = Image::make($filePath)->width();
                 $height = Image::make($filePath)->height();
                 //要保存的文件名 时间+扩展名
-                $filename = time() . '_' . uniqid() . '*' . $width . '_' . $height . '.' . $kuoname;
-                //todo 等待客户端更新后替换为下列规则
-                //$filename = time() . '_' . uniqid() . '.' . $kuoname . '?' . $width . '_' . $height;
+                $filename = time() . '_' . uniqid() . '.' . $kuoname . '?' . $width . '_' . $height;
             } else {
                 //要保存的文件名 时间+扩展名
                 $filename = time() . '_' . uniqid() . '.' . $kuoname;
@@ -59,7 +57,7 @@ class UploadController extends Controller
                 $width = Image::make($filePath)->width();
                 $height = Image::make($filePath)->height();
                 //要保存的文件名 时间+扩展名
-                $filename = time() . '_' . uniqid() . '*' . $width . '_' . $height . '.' . $kuoname;
+                $filename = time() . '_' . uniqid() . '.' . $kuoname . '?' . $width . '_' . $height;
             } else {
                 //要保存的文件名 时间+扩展名
                 $filename = time() . '_' . uniqid() . '.' . $kuoname;