Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused avatars #9142

Open
BaxAndrei opened this issue Nov 23, 2019 · 6 comments
Open

Remove unused avatars #9142

BaxAndrei opened this issue Nov 23, 2019 · 6 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@BaxAndrei
Copy link

Abbility to remove unused avatars.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Nov 24, 2019
@bagasme
Copy link
Contributor

bagasme commented Nov 24, 2019

@BaxAndrei any details?

@BaxAndrei
Copy link
Author

I noticed that when a user changes their avatar, a new one will be uploaded to the server, and the old one will still be there. I also know that the name of the avatar is a hash of it. My proposal is that, if a user changes his avatar, the system will check in the database if there is any user using the old avatar, and if it is no longer used by anyone, it will be automatically deleted.

@guillep2k
Copy link
Member

There's already a PR working on that by adding the user's ID as input for the hash, so there will never be a collision.

@guillep2k
Copy link
Member

@lunny Maybe a check for unused resources can be added to the "doctor" (avatars, attachments, LFS objects)?

@BaxAndrei
Copy link
Author

@lunny Maybe a check for unused resources can be added to the "doctor" (avatars, attachments, LFS objects)?

Yes, will help.

@lunny
Copy link
Member

lunny commented Nov 25, 2019

@guillep2k good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

4 participants