
Hi,
Is it possible for a function (or webhook?) to return a file ? I want to return user profile image only from an id of a user ?

If it's small, you can try to base64 encode it

Otherwise, you may need to make profile images public

And if it is public, how can I achieve this ?

if it's public, you can use the storage api to fetch it 🧐

assuming you're storing it in appwrite...

But If I don't have the url of the image ? link of the profile picture is in the collection of my user, so I need to fetch first user collection, get the link and then get image from storage

i would store the images in a profile images bucket where the ID matches the user ID. then you can easily get the file with the user id

hum ok, I see, good idea 👌
Recommended threads
- Appwrite messaging api error
```=== Push Notification Function Started === Endpoint: https://fra.cloud.appwrite.io/v1 Project: 6899062700398ffeae4f Database: threed-dating-db Notification f...
- function unable to detect client ip
Hi I have hosted appwrite on self hosted server. Currently I don't have any domain. I am accessing through ip. I have created one function which should detect t...
- Appwrite Cloud Function runs forever, ev...
It just keeps running, and there's no way to manually stop it.
