yingzi 2 年之前
父節點
當前提交
218d40c471
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/system/controller/Upload.php

+ 2 - 2
app/system/controller/Upload.php

@@ -94,12 +94,12 @@ class Upload extends AuthController{
         if(empty($file)) {
             return app('json')->fail("未上传文件");
         }
-        $upPath = \think\facade\Filesystem::disk('resource')->putFileAs( "cert", $file,"weixin". DIRECTORY_SEPARATOR.date('Ymd').DIRECTORY_SEPARATOR.$file->getBasename());
+        $upPath = \think\facade\Filesystem::disk('resource')->putFileAs( "cert", $file,"weixin". DIRECTORY_SEPARATOR.date('Ymd').DIRECTORY_SEPARATOR.$file->getFilename());
         if(!$upPath){
             return app('json')->fail("上传失败01");
         }
         $savePath = '/resource/' . $upPath;
-        return app('json')->success(['cert'=>$savePath,"type"=>$type,"name"=>$file->getBasename()]);
+        return app('json')->success(['cert'=>$savePath,"type"=>$type,"name"=>$file]);
     }