Back

Help me with the JSON and uploadToursToAppwrite.js - I pay $20

  • 0
  • General
PaoloLee
12 Mar, 2024, 15:16

Is anybody willing to help me and set properly the DB and collection already created? I have to upload an existing JSON I use locally with the React app.

I am not familiar with the DB. I can pay $20 by Paypal for a video call. If you agree the audio and video must great quality.

See the JSON attached

I got this message after the prompt node uploadToursToAppwrite.js

TypeScript

  code: 400,
  type: 'document_invalid_structure',
  response: {
    message: 'Invalid document structure: Unknown attribute: "mainImage"',
    code: 400,
    type: 'document_invalid_structure',
    version: '0.12.113'
  }
}
TL;DR
Developers having trouble creating a JSON for Appwrite, specifically with missing attributes like "mainImage." Make sure to follow the guide provided in the link and double-check attribute names. Solution: Ensure all necessary attributes like "mainImage" are present in the collection. Also, consider adding the missing attribute in the JSON structure before uploading.
Kenny
12 Mar, 2024, 15:22

Does main image exist on your collection?

PaoloLee
12 Mar, 2024, 15:43

nope

PaoloLee
12 Mar, 2024, 15:45

I have problem how to create the JSON. is not complex for me frontend side but quite cokplext with Appwrite beacuase I am new wiht the app

PaoloLee
12 Mar, 2024, 15:45

May you help me?

Faye
12 Mar, 2024, 15:50

Heyo!

As it says, your attribute "mainImage" is missing. Go to the collection you want to work with and make sure the attribute mainImage exists.

Faye
12 Mar, 2024, 15:51
PaoloLee
12 Mar, 2024, 15:55

ok! None of the attribute is in the collection which is empty.

Faye
12 Mar, 2024, 15:56

Make sure to add attributes. Check out the link I posted, it shows a quick overview of how appwrite databases work!

Faye
12 Mar, 2024, 15:56

also it's cAsE sEnSiTiVe

PaoloLee
12 Mar, 2024, 15:58

how to create this: "itinerarySteps": [ { "stepTitle": "Hotel Pickup", "stepDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }, { "stepTitle": "Hotel Pickup", "stepDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }, { "stepTitle": "Hotel Pickup", "stepDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." } ]

PaoloLee
12 Mar, 2024, 15:59

It coudl be a stupid question but I am bit disoriented.

Faye
12 Mar, 2024, 15:59

Create 3 documents, with 2 attributes both strings called stepTitle and stepDescription

Faye
12 Mar, 2024, 15:59

(create the attributes first)

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