feat:修复自定义上传文件接口找不到问题
parent
d8e8a00f1b
commit
6c5c12c633
|
@ -132,7 +132,7 @@ class EmoticonController extends CController
|
|||
/**
|
||||
* 自定义上传表情包
|
||||
*
|
||||
* @RequestMapping(path="upload", methods="post")
|
||||
* @RequestMapping(path="upload-emoticon", methods="post")
|
||||
* @param Filesystem $filesystem
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
|
@ -142,6 +142,7 @@ class EmoticonController extends CController
|
|||
if (!$file->isValid()) {
|
||||
return $this->response->fail(
|
||||
'图片上传失败,请稍后再试!',
|
||||
[],
|
||||
ResponseCode::VALIDATION_ERROR
|
||||
);
|
||||
}
|
||||
|
@ -150,6 +151,7 @@ class EmoticonController extends CController
|
|||
if (!in_array($ext, ['jpg', 'png', 'jpeg', 'gif', 'webp'])) {
|
||||
return $this->response->fail(
|
||||
'图片格式错误,目前仅支持jpg、png、jpeg、gif和webp',
|
||||
[],
|
||||
ResponseCode::VALIDATION_ERROR
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue