fix: metadata
This commit is contained in:
@@ -21,8 +21,12 @@ export const uploadImage = (filePath) => {
|
||||
if (res.statusCode < 400) {
|
||||
try {
|
||||
const keyJson = JSON.parse(res.data);
|
||||
const url = `https://file.lihailezzc.com/${keyJson?.data.key}`;
|
||||
resolve(url);
|
||||
if (keyJson?.data?.result === "auditFailed") {
|
||||
reject("图片不符合发布规范,请稍作修改后再试");
|
||||
} else {
|
||||
const url = `https://file.lihailezzc.com/${keyJson?.data.key}`;
|
||||
resolve(url);
|
||||
}
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user