I hope you're doing well. I'm reaching out because I'm having trouble creating a new document through the Appwrite API, and I'm consistently getting a server error.
Server error 500
**Technology **
Html, css ,React Js
are you using cloud or self hosting?
Please provide the project id, code or request payload, and info about the collection
ProjectId : 6586a26b0f284c8ab1ad
Code : const newPost = await databases.createDocument(
appwriteConfig.databaseId,
appwriteConfig.postCollectionId,
ID.unique(),
{
creator: post.userId,
caption: post.caption,
imageUrl: fileUrl,
imageId: uploadedFile.$id,
location: post.location,
tags: tags,
}
);
Collection Info
Are you still getting this error?
What tutorial are you following?
Please share the attributes on the posts collection
Yes,
these are all the attributes?
what's the exact error now?
yes
same server error 500
Would you please check the network tab if the browser dev tools and share the payload of the request?
Also, make sure the user has the relevant permissions to all related collections
Recommended threads
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...