I have a web app where a user can create multiple documents in the database and also upload images, the problem is how will I identify for particular which document the image was uploaded eg. If I create a blog where user can add image, name, etc, what if the user creates multiple blogs and add image to those blogs, for every blog a separate document is needed to be created how can I add the document Id to identify this particular image belong to this blog ?
Please reply?
You can store a unique ID with ID.unique() or UUID in a variable. So use the same id as image_url in your database and as your fileId in the bucket
I'm the document, you would put the file id...
Recommended threads
- general_route_not_found - Auth Guide
If you’ve just added a subdomain to your project, verified your DNS records, and confirmed your SSL certificate is working, but you're still hitting a `general_...
- Can't resume paused project
I have logged in in incognito, done the email verification and still get the invalid fingerprint error. What's the issue.
- How to Display File in Web?
I'm trying to use Appwrite's Storage to store images and display them in my app, however when I use the `getFileView`, `getFileDownload` or `getFilePreview` met...