
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
- Permissions for bulk operation
Hi team, I have a question: “In the databases.createDocuments bulk API, can I set document-level permissions? If yes, how exactly should I include the permissio...
- Limit File Upload count?
Is there a way to limit the number of files a user can upload? I know there's a limit of file size but in my case I'd like to limit the user to only upload x am...
- Function not rebuilding properly
I have a function connected to github. Whenever I push to github it triggers a rebuild as expected, but the new function is not activated after done. Also it ...
