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
- How Can I Create landing page in appwrit...
I created function called invoice URL https://app.getrestt.com/v1/functions/invoice/executions?id=test-76f948fe83c43422561fe096c0674a1bd3ff0702cdfcf2444293ab31...
- DeploymentStatus enum value `canceled` m...
Hey, Sorry if it has been reported already, I found an issue using the Dart SDK where the `canceled` enum value is missing from `DeploymentStatus`. This causes...
- Synchronous function execution timeout w...
I am calling server functions with xasync = true and I still get this error message. Synchronous function execution timed out. Use asynchronous execution inste...