
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
- Error importing data after server migrat...
Hello, I recently purchased a new web server and when trying to migrate my data from the old server to the new (both self-hosted instances of appwrite on coolif...
- REST API does not work for queries
``` curl -X GET "https://cloud.appwrite.io/v1/databases/<db-id>/collections/<c-id>/documents" -H "X-Appwrite-Project: <project-id>" -H "X-Appwrite-Key: <key>"...
- deleteDocments is not a function
Hello. At the bottom of my project's console, in the footer, I have `Version 1.7.4`. However, when I run my server side function, I am told that `databases.dele...
