Opened 10 years ago

Closed 9 years ago

#3426 closed (duplicate)

FileField / ImageField - old files left around

Reported by: Ionuț Ciocîrlan Owned by: Adrian Holovaty
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When uploading a new file as a replacement for an old one using the FileField, the old file is left lying around on the file system.

The old one should be deleted, which would be consistent with the behavior exhibited when deleting an object with a FileField.

Change History (3)

comment:1 Changed 10 years ago by Adrian Holovaty

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 10 years ago by Malcolm Tredinnick

I'm very suspicious of allowing automatic file deletion as a default. It's *forever* so if anything else in the system is using the file, it's bad.

Maybe an attribute on the field for deleting replaced files?

comment:3 Changed 9 years ago by Marc Fargas <telenieko@…>

Resolution: duplicate
Status: newclosed

#4339 talks about the same thing, but has a patch so I'm marking this one duplicate of that one.

Note: See TracTickets for help on using tickets.
Back to Top