mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-28 13:22:49 +08:00
上传头像逻辑优化
This commit is contained in:
parent
3b1de0c250
commit
4558f63af8
@ -44,7 +44,10 @@ export const UserInfoModel: React.FC<PropInterface> = ({ open, onCancel }) => {
|
||||
authorization: "Bearer " + getToken(),
|
||||
},
|
||||
beforeUpload: (file) => {
|
||||
const isPNG = file.type === ("image/png" || "image/jpg");
|
||||
const isPNG =
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/jpeg";
|
||||
if (!isPNG) {
|
||||
message.error(`${file.name}不是图片文件`);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user