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
- Issue with Authentication
I am stuck with authentication using appwrite. I am getting bad request 400 error when trying to register though we already have project, database, collection c...
- getaddrinfo EAI_AGAIN when using axios
I have this code to make a get request to an API ```javascript function fetchUserListPerPage(page) { return new Promise(async (resolve, reject) => { ...
- Appwrite CLI not working as expected
Until yesterday I was authenticated in my Appwrite instance through the CLI, and I was able to get my functions and deploy them manually. Today, when I went ba...