yingzi %!s(int64=2) %!d(string=hai) anos
pai
achega
218d40c471
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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]);
     }