Back

Server Error when trying to create a document in collection.

  • 0
  • Cloud
ChrisMF
27 Apr, 2024, 01:36

Was working previously now is giving an error. I'm trying to upload a file (image) and link it to a collection of images. Is something wrong on my end or?

TL;DR
Developers encountering server error when trying to create a document in a collection. Code snippet for creating the cover image seems correct but upload is failing. Request to check SDK implementation. It used to work, now issue arises. Review ongoing to identify the problem.
VincentGe
27 Apr, 2024, 01:38

πŸ‘€ Can I see how you're calling the SDK?

VincentGe
27 Apr, 2024, 01:39

Could definitely be on our end, lemme tag a few people to take a peek.

ChrisMF
27 Apr, 2024, 01:41
TypeScript
    const newCoverImage = await databases.createDocument(
        appwriteConfig.databaseId,
        appwriteConfig.coverImageCollectionId,
        ID.unique(),
        {
          UserID: image.userId,
          CoverImageURL: fileUrl,
          CoverImageID: uploadedFile.$id
        }
      );```
ChrisMF
27 Apr, 2024, 01:41

this is where im getting the error. I've console.log all of the data and everything is correct, it's jsut failing to upload. database id and collection id are correct as well.

ChrisMF
27 Apr, 2024, 01:51

project ID: 6550f618e99317277bfd

VincentGe
27 Apr, 2024, 01:53

I'll make sure someone takes a look πŸ™‚

VincentGe
27 Apr, 2024, 01:53

Btw what's supermarket simulator?

VincentGe
27 Apr, 2024, 01:53

πŸ‘€

ChrisMF
27 Apr, 2024, 01:54

haha, you literally just open a litle supermarket and run it. gotta store things and make price tags etc.. my mom has been on my account for like 2 weeks playing it. i bought it for her so she wouldn't be so bored lol!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more