does anyone know what is this error mean? I am uploading a file into bucket and manually creating public URL for the image and storing it into database. I am getting this error on updating the document
const result = await db.updateDocument(dbName, usersCollection, userId, {
bannerURL: image,
});
I am getting this image from other method and tested that I am getting the data in image variable
Can you share the payload was sent by the browser?
Like so?
This is weird can you past the whole request CURL?
Everything seems in order
- Here you're getting back good results?
- Is your code wrapped in
try/catch?
no option to copy as curl
Here is the entire function:
const updateImageURL = async (userId: string, image: string, isBanner: boolean) => {
try {
console.log(image);
if (isBanner) {
const result01 = await db.updateDocument(palettegramDB, usersCollection, userId, {
bannerURL: image,
});
if (!result01) {
throw new Error("Error in updating user image");
}
return result01;
} else {
const result02 = await db.updateDocument(palettegramDB, usersCollection, userId, {
avatarURL: image,
});
if (!result02) {
throw new Error("Error in updating user image");
}
return result02;
}
} catch (error: any) {
console.log(error);
}
return null;
};
Recommended threads
- Not getting data
IDK what the issue is but I am stuck at a weried but that I am calling this function ``` @override Future<List<CategoryModel>> getCategories() async { t...
- Problem with the new Email policies
when user set those thing from cloud panel and when they open that page again or reload that time it forget what we have checked and it set default to false on ...
- Deleted my account, trying to signup aga...
https://cloud.appwrite.io/console/login?error=%7B%22message%22%3A%22This+email+address+must+already+be+in+its+canonical+form.+Please+remove+aliases%2C+tags%2C+o...