Closed Bug 779541 Opened 13 years ago Closed 11 years ago

Delete or "trash bin" attachments after the associated article is deleted

Categories

(developer.mozilla.org Graveyard :: File attachments, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: openjck, Unassigned)

References

Details

(Whiteboard: [triaged][type:change])

Quoting Sheppy: > The way we have it now, [attachments] stick around forever. They should be put > into a trash bin or something that we can empty from admin tools (instead of > having to manually delete them all from admin).
Version: Kuma → unspecified
Component: Website → Landing pages
Whiteboard: u= c= s= p=
Component: Landing pages → File attachments
Whiteboard: [triaged][type:change]
This seems like a bad idea, as attachments can be used on pages other than the one they are uploaded to.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
(In reply to David Walsh :davidwalsh from comment #1) > This seems like a bad idea, as attachments can be used on pages other than > the one they are uploaded to. And there is no way to detect that? I believe there should be a smart logic checking if there are any references to an attachment and if not, delete it. Sebastian
Flags: needinfo?(dwalsh)
Probably (?) but we also have to consider old revisions too.
Flags: needinfo?(dwalsh)
That's true. This is a complicated thing. Perhaps we should have an "archived" area for images which haven't been expressly deleted and are still referenced from an article somewhere (either current or historically). We do need the ability to outright delete images, though, of course -- so we can deal with spammy/porny/bogus/lame images.
Attachments need to have revisions like articles. Then it's possible to have them available in older revisions of an article, but have them deleted in the current version of it. Example: 1. article is created by the user (revision 1) 2. attachment is added by the user (revision 2) 3. article is deleted by the user (revision 3) 4. attachment is automatically deleted because of missing references to it (revision 4) Having attachments in the revision system would also pave the way for other issues like e.g. bug 665747. Sebastian
OS: Linux → Unspecified
Hardware: x86_64 → Unspecified
See Also: → 1026639
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.