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
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...