Hey there, I could use a hand with something in the app I'm working on. Here, users can upload profile pictures, and I've set up a database ('userDatabase') to store userId ($id) and profileId (id of profile picture). The actual images are in a bucket called 'userBucket.'
The process to fetch the image feels a bit convoluted. We first get the profile picture ID from 'userDatabase' and then fetch the image. Also, .getFilePreview sometimes returns a URL even if the file doesn't exist, which messes things up.
Any ideas on simplifying this process or fixing the .getFilePreview issue? Thanks in advance!
Guidance needed for setting user profile picture
We first get the profile picture ID from 'userDatabase' and then fetch the image.
if you're going to allow users to change their profile picture. this sounds like the right approach.
Any ideas on simplifying this process or fixing the .getFilePreview issue?
If you want to make sure the file exists, you'd have to use the get file api call.
Recommended threads
- I’m facing an issue with deployments on ...
Hi Appwrite Support, I’m facing an issue with deployments on Appwrite Sites. A few days ago (around 3–4 days back), everything was working perfectly. My deplo...
- Appwrite Cloud project is paused and nev...
Hi Appwrite Team & Community, I am facing a problem with one of my Appwrite Cloud projects which seems to be identical to the other cases of "paused projects" ...
- Export, Import or Migration giving this ...
As you can see in yhe screenshot i am not able to export any data or export the data from tables. Also it is affecting the migration from appwrite to appwrite h...