Rank 2: Process
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 ?
Votes
0
Replies
8
Participants
Unknown
Messages
9
Rank 2: Process
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 ?
Admin
If it's small, you can try to base64 encode it
Admin
Otherwise, you may need to make profile images public
Rank 2: Process
And if it is public, how can I achieve this ?
Admin
if it's public, you can use the storage api to fetch it 🧐
Admin
assuming you're storing it in appwrite...
Rank 2: Process
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
Admin
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
Rank 2: Process
hum ok, I see, good idea 👌