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
- Does Appwrite allow SSE ?
i'm trying to setup a slack bot on my site. Your deployed SSE endpoint is returning a non‑SSE response …and the browser immediately closes the connection. read...
- The console isnt showing documents
In console ui saved documents are being shown on frontend but i can see its showing 4 or number of docs available but in rows its only showing single doc and th...
- 1.8.1 - Databases - inline updating a ro...
When updating a database field via the inline edit method, the `$updatedAt` column does not get updated. Only if the row is updated by the "Update" interface (t...