alphagov/whitehall — pull request #143 by h-lame (2013-01-14 14:45:13+00:00)
Title: Attachment data can be replaced

When editing something that has attachments we present the user with 3 options:

"Keep", "Remove" and "Replace". There is also a "Replacement" file field.

If the user chooses "Keep" the replacement is ignored.
If the user chooses "Remove" the whole attachment is removed from the thing we are editing.
If the user chooses "Replace" the data file in the replacement field is used to create a new attachment_data instance that is the replacement of the previous one. Once the container is made visible, the url for the old replaced attachment_data will redirect to the new one.

In passing I've tidied up how our 'quaratine-files' tag for cucumber works to make it behave more like production (e.g. put virus-checked files into a location that isn't in public/).