|
|
@@ -90,16 +90,16 @@ class Upload extends AuthController{
|
|
|
public function uploadCertFile(Request $request){
|
|
|
$uploadConfig = config('filesystem');
|
|
|
$file = $request->file('file');
|
|
|
- $code = "cert";
|
|
|
+ $type = $request->post("type","");
|
|
|
if(empty($file)) {
|
|
|
return app('json')->fail("未上传文件");
|
|
|
}
|
|
|
- $upPath = \think\facade\Filesystem::disk('resource')->putFileAs( $code, $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->getBasename());
|
|
|
if(!$upPath){
|
|
|
return app('json')->fail("上传失败01");
|
|
|
}
|
|
|
$savePath = '/resource/' . $upPath;
|
|
|
- return app('json')->success(['cert'=>$savePath]);
|
|
|
+ return app('json')->success(['cert'=>$savePath,"type"=>$type]);
|
|
|
}
|
|
|
|
|
|
|