
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
- Appwrite Fra Cloud Custom Domains Issue
I’m trying to configure my custom domain appwrite.qnarweb.com (CNAME pointing to fra.cloud.appwrite.io with Cloudflare proxy disabled) but encountering a TLS ce...
- Appwrite service :: getCurrentUser :: Us...
Getting this error while creating a react app can someone please help me solve the error
- Storage & Database is not allowing.
Storage & Database is not allowing to CRUD after i have logged in ? Using web SDK with next.js without any SSR or node-sdk.
