
Sorry for bothering you everyone but I am getting this error
This is my post form relevant part `else { const file = data.image ? appwriteService.uploadFile(data.image[0]) : <Loading />; try { if (file) { const fileId = file.$id data.blogImage = fileId const dbPost = await appwriteService.createPost({ ...data, userId: userData.$id})
if (dbPost) {
navigate('/profile')
}
}
} catch (error) {
console.log(`ERROR POSTING `, error)
}
}`
This is appwrite services `import {Client, ID, Databases, Storage, Query } from 'appwrite'; import conf from '../conf/conf'
export class AppwriteService{ client = new Client(); databases; storage;
constructor () {
this.client
.setEndpoint(conf.appwriteUrl)
.setProject(conf.appwriteProjectId)
this.databases = new Databases(this.client);
this.storage = new Storage(this.client);
}
async createPost ({title, content, blogImage, userId}) {
try {
await this.databases.createDocument(
conf.appwriteDatabaseId,
conf.appwriteArticleCollectionId,
userId,
{
title,
content,
blogImage,
}
)
} catch (error) {
console.log("Backend :: createPost :: error", error)
throw error
}
}`
Please help

Backend :: createPost :: error AppwriteException: Invalid document structure: Missing required attribute "blogImage" at Client.<anonymous> (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=de89454e:850:17) at Generator.next (<anonymous>) at fulfilled (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=de89454e:488:24) PostForm.jsx:52
ERROR POSTING AppwriteException: Invalid document structure: Missing required attribute "blogImage" at Client.<anonymous> (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=de89454e:850:17) at Generator.next (<anonymous>) at fulfilled (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=de89454e:488:24)
this is the error

I am using reactJs
Recommended threads
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
