bug: avatar uploads
This commit is contained in:
parent
0a6339ddf1
commit
462fc60dfe
@ -78,8 +78,9 @@ export default function ProfileSettings() {
|
|||||||
if (file) {
|
if (file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
let rsp = await uploader.upload(file, file.name);
|
let rsp = await uploader.upload(file, file.name);
|
||||||
if (!rsp?.error) {
|
console.log(rsp);
|
||||||
throw new Error("Upload failed, please try again later");
|
if (typeof rsp?.error === "string") {
|
||||||
|
throw new Error(`Upload failed ${rsp.error}`);
|
||||||
}
|
}
|
||||||
return rsp.url;
|
return rsp.url;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user