Back

[SOLVED] Examples for Image Uploading using Appwrite Function

  • 0
  • Web
Jaydeep
5 Jun, 2023, 07:03

I had the same doubt regarding image upload. Can anyone share any GitHub repo to understand as an example. Or any code snippets. Thanks

the approach is to make appwrite function and then trigger image creation and storing metadata in collection

TL;DR
A user had a question about image uploading using the Appwrite function. Another user provided example code snippets in React and Svelte to help with understanding. They also shared links to the Appwrite documentation and a demo app for further reference. The solution suggested is to create an Appwrite function to trigger image creation and store metadata in a collection.
joeyouss
5 Jun, 2023, 10:59
joeyouss
5 Jun, 2023, 11:00

thanks @Meldiron for building this

Meldiron
5 Jun, 2023, 11:01

Aaand here is how it "links" to collection: https://github.com/Meldiron/authui/blob/main/src/lib/form.svelte#L97-L103

You simply have string attribute and store file's ID there. You get file ID after creating file.

Later you can use this fileId to render image, like this: https://github.com/Meldiron/authui/blob/main/src/lib/modal.svelte#L129-L134

Jaydeep
5 Jun, 2023, 14:31

thanks jyoti

Jaydeep
5 Jun, 2023, 14:32

but do you have any code in react πŸ₯²

joeyouss
5 Jun, 2023, 15:23

ah i dont think so

joeyouss
5 Jun, 2023, 15:23

maybe this gives you an idea ?

Jaydeep
5 Jun, 2023, 16:00

Understood

Thanks @Steven @joeyouss

Jaydeep
9 Jun, 2023, 13:36

[SOLVED] Examples for Image Uploading using Appwrite Function

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