lobe-chat icon indicating copy to clipboard operation
lobe-chat copied to clipboard

[Request] 优化S3对已删除文件的存储管理

Open ykangw opened this issue 1 year ago • 2 comments

🥰 需求描述

在用户对话框中上传图片时,该图片会被上传至S3存储。然而,如果用户在发送前删除了这张图片,S3中的对应文件并不会被自动删除。由于该图片在LobeChat用户端并不显示,用户无法手动从S3中删除它,导致这些文件会永久保留在S3中,从而造成存储资源的浪费。

🧐 解决方案

建议在用户删除上传的图片(以及未来可能支持的文件类型)时,能够同步删除S3中的相应存储文件。

📝 补充信息

No response

ykangw avatar Aug 15 '24 09:08 ykangw

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🥰 Description of requirements

When uploading an image in the user dialog box, the image will be uploaded to S3 storage. However, if the user deletes the image before sending, the corresponding file in S3 will not be automatically deleted. Since the image is not displayed on the LobeChat client, the user cannot manually delete it from S3. As a result, these files will remain in S3 permanently, resulting in a waste of storage resources.

🧐 Solution

It is recommended that when users delete uploaded images (and file types that may be supported in the future), the corresponding storage files in S3 can be deleted simultaneously.

📝 Supplementary information

No response

lobehubbot avatar Aug 15 '24 09:08 lobehubbot

👀 @ykangw

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot avatar Aug 15 '24 09:08 lobehubbot

已支持:https://github.com/lobehub/lobe-chat/pull/3487

arvinxx avatar Aug 21 '24 13:08 arvinxx

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Already supported: https://github.com/lobehub/lobe-chat/pull/3487

lobehubbot avatar Aug 21 '24 13:08 lobehubbot

✅ @ykangw

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

lobehubbot avatar Aug 21 '24 13:08 lobehubbot

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Sep 30 '25 01:09 github-actions[bot]