|
@@ -21,6 +21,7 @@ class FileUploadService extends Service
|
|
];
|
|
];
|
|
|
|
|
|
public function uploadFile($file){
|
|
public function uploadFile($file){
|
|
|
|
+ if(empty($file)) return [false, '请上传文件'];
|
|
// 获取文件相关信息
|
|
// 获取文件相关信息
|
|
$ext = $file->getClientOriginalExtension(); // 扩展名
|
|
$ext = $file->getClientOriginalExtension(); // 扩展名
|
|
$realPath = $file->getRealPath(); //临时文件的绝对路径
|
|
$realPath = $file->getRealPath(); //临时文件的绝对路径
|