|
|
|
@ -18,8 +18,8 @@ class UploadController extends Controller |
|
|
|
public function image(Request $request) |
|
|
|
{ |
|
|
|
$image = $request->file('image'); |
|
|
|
if (!$image->isValid()) { |
|
|
|
return $this->error('未获取到任何文件'); |
|
|
|
if (empty($image) || !$image->isValid()) { |
|
|
|
return $this->error('您未上传任何文件'); |
|
|
|
} |
|
|
|
|
|
|
|
$mime = $image->getMimeType(); |
|
|
|
|