I’m using too much file storage because I have so many files in chat.
I want to delete only the files without deleting the chat messages.
How do I delete only the files?
Hi @itsbeomy ,
There are a couple of ways to reduce file storage:
- Message Retention -
Specifies the length of time in hours that the messages are retained. The maximum message retention period is six months or 4,380 hours. You can reduce this value for your application by contacting our sales team. Sendbird will auto-delete retained messages (including File and Text messages) after this period.
- Using Platform API:
-
Retrieve the list of messages: Use the Message Search API to retrieve a list of messages for your application_id. You can specify filters such as channel URL, message type, or sender ID to narrow down the search: https://sendbird.com/docs/chat/v3/platform-api/message/messaging-basics/list-messages#1-list-messages
-
Delete messages: Once you have the list of messages, you can use the Message Delete API to delete individual messages or multiple messages at once. You will need to provide the message ID(s) of the messages you want to delete: https://sendbird.com/docs/chat/v3/platform-api/message/messaging-basics/delete-a-message#1-delete-a-message.
I don’t think you understood what I was saying.
I don’t want to delete the message itself, I just want to delete the file I sent in the file message.
I see the file message in the chat window, but selecting it doesn’t allow me to download it.
Is this method not supported?