I have a chat app which uses the Realtime API for the chats, I am trying to create a file sharing feature for the app using storage. But my question is how to show the photos(let's say) in the app. Like the photo should remain at the same position where it was sent. How do I achieve this?
Remain at the same position? What do you mean?
I think I overexplained my problem, sorry for that. I just want to send photos to my chat.
Have you looked at this? https://appwrite.io/docs/products/storage
What exactly are you having problems with?
How can I show the photos added to the storage in my chat?
Yes I have read the docs, I want the photos to persist in the chat even after the user refreshes the page. One way I can think of is to create a new attribute in the message collection and add the image url to it and then display it in the chat.
Yes
Thankyou Steven!
Implemented! Used this approach created an attribute in the messages collections named file_id and the used the previewImage endpoint to show it in the chat if the file_id is not null
Great!
Does that solves the issue?
Ah! Yes it did. Closing this post.
[SOLVED] Need help with adding files to my chat app
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...