Homec4science

When deleting a file, delete all transformations of the file

Authored by epriestley <git@epriestley.com> on May 10 2013, 01:08.

Description

When deleting a file, delete all transformations of the file

Summary:
Fixes T3143. When a user deletes a file, delete all transforms of the file too. In particular, this means that deleting an image deletes all the thumbnails of the image.

In most cases, this aligns with user expectations. The only sort of weird case I can come up with is that memes are transformations of the source macro image, so deleting grumpycat will delete all the hilarious grumpycat memes. This seems not-too-unreasonable, though, and desirable if someone accidentally uploads an inappropriate image which is promptly turned into a meme.

Test Plan:
Added a unit test which covers both inbound and outbound transformations.

Uploaded a file and deleted it, verified its thumbnail was also deleted.

Reviewers: chad, btrahan, joseph.kampf

Reviewed By: btrahan

CC: aran, joseph.kampf

Maniphest Tasks: T3143

Differential Revision: https://secure.phabricator.com/D5879

Details

Committed
epriestley <git@epriestley.com>May 10 2013, 01:08
Pushed
aubortJan 31 2017, 17:16
Parents
rPHdc6c1bf4351e: Fail quietly when failing to write access log
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH402d2e260544: When deleting a file, delete all transformations of the file (authored by epriestley <git@epriestley.com>).May 10 2013, 01:08