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
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- HTTP Error 500 ''
Hello to everyone, I'm a Flutter developer and actually I'm developing an app using Appwrite.. during my tests and also massive ones I've noticed something we...