I've been trying to create document and upload a file. In both cases, this error is shown.
I don't really know what to put here since the error is shown in 'storage.ts'.
Here is my submitHandler function.
`const submitHandler = async (data) => { data.preventDefault(); try { const file = await service.uploadFile(image);
if(file) {
const fileId = file.$id
const document = await service.createDocument({slug},
postName,
content,
fileId,
status,
userData.$id
);
if(document) {
navigate(`/post/${document.$id}`)
}
}`
I didn't bother to search how to write code here. Sorry for that.
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...