Skip to content
Back

Missing required parameter: "data"

  • 0
  • Databases
  • Web
Drake
22 May, 2023, 14:55

If you're on Cloud, you can't update the attribute to make it not required. You'll have to pass that attribute when creating the document. Alternatively, you can delete and recreate the attribute (but that will delete the data you have in that attribute for your documents).

TL;DR
The user is experiencing an issue with a missing required parameter for "data" while trying to upload an image to their database. They are looking for guidance on how to resolve this issue. A fellow user suggests using `storage.createFile()` to upload an image and retrieve the image ID. Another user suggests placing the image ID in the document. There is no clear solution mentioned in the thread.
ijay
22 May, 2023, 16:10

okay

ijay
22 May, 2023, 16:11

pls have searched google but i don't know how to make an image upload to a dbase

ijay
22 May, 2023, 16:13

image cant upload

ijay
22 May, 2023, 16:16

i can re-snap if it not clear

Drake
22 May, 2023, 16:42

image? If you're working with files, you should be using the storage api. See https://appwrite.io/docs/storage

ijay
22 May, 2023, 16:49

Does that mean I have to restart

ijay
22 May, 2023, 16:49

Let me read thru first

ijay
22 May, 2023, 16:50

Thanks

ijay
22 May, 2023, 17:02

Have created a document and it's working. Creating another storage will not affect.

Drake
22 May, 2023, 17:06

I usually put the ID of the created file into my document

ijay
23 May, 2023, 14:05

hello,

ijay
23 May, 2023, 14:07

pls concerning the image what do i do. i want the users to be able to upload an image and fill the other fields.

ijay
23 May, 2023, 14:08

concerning this how do i do it

ijay
23 May, 2023, 14:09
ijay
23 May, 2023, 14:10

sorry if am disturbing

Drake
23 May, 2023, 15:07

what?

ijay
24 May, 2023, 06:14

Good morning, Am asking if what I sent is okay cause. I created a form section, I want user to be able to fill and upload an image.

D5
24 May, 2023, 06:40

Not URL, image ID

Drake
24 May, 2023, 07:19

To upload an image, use storage.createFile(). It will return a file id which you can place in the document

ijay
24 May, 2023, 07:22

Pls can you give me an example

Drake
24 May, 2023, 07:23

Did you look at this? https://appwrite.io/docs/storage

ijay
24 May, 2023, 07:45

Yes I did I will go through it again.

ijay
24 May, 2023, 13:15

Have created the storage... this my db pls what do i put in the image input field

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