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
- 1.9.5 Migration problem
1.9.5 migration problem after run migration command only openruntimes-executor
- Appwrite Sites deployment fails because ...
Appwrite Cloud Sites deployments are failing consistently for both GitHub and manual deployments. The build command completes successfully and packaging also c...
- Build succeeds but deployment fails — si...
My Next.js 15.5.20 site (standalone output mode) builds successfully on Appwrite Sites, but the deployment fails at the final packaging step with: [sidecar:bui...