I'm currently using Stream Chat React to build a chat application, and I'm facing an issue when trying to delete a single attachment from a message containing multiple attachments. I can successfully delete the entire message using the methods provided in the Stream Chat React documentation, but I cannot find a way to delete just one attachment from the message.
Here's what I have tried so far:
I've checked the Stream Chat React documentation for any methods specifically designed to remove single attachments, but I couldn't find any. I tried modifying the message object by removing the desired attachment and then updating the message, but it didn't seem to work.
Tried method to delete the attachment
// Delete File await channel.deleteFile(fileURL);
// Delete Image await channel.deleteImage(imageURL);
URL - https://getstream.io/chat/docs/react/file_uploads/?language=javascript
ERROR - The file not found this but we trying to access the image or file with the same URL it is accessable.
I would appreciate any guidance on how to delete a single attachment from a message with multiple attachments in Stream Chat React. Is there a built-in method or workaround to achieve this functionality? If anyone has faced a similar issue or can point me in the right direction, that would be extremely helpful. Thank you!