mothership-ec / cog-mothership-file-manager

Mothership File Manager Cogule
Other
1 stars 1 forks source link

Add ability to restore 'deleted' files #42

Open eleanorshakeshaft opened 11 years ago

eleanorshakeshaft commented 11 years ago

Currently when a file is deleted the row in the 'file' table in the database is removed. Users cannot undo a delete.

This functionality to restore a file must be implemented, so that the row is kept but deleted_at/deleted_by info is saved. Users can then select to 'undo' a delete or when they try to upload the same image an option to restore is presented.

lsjroberts commented 11 years ago

This functionality used to exist but I disabled due to concerns about the user expecting the file to be physically removed from the server.

There was discussion on a kind of double confirmation for completely deleting a file but I can't find the issue.

edit: This has already been brought up, ignore me.

joeholdcroft commented 11 years ago

This should be configurable (so you can chose for it to actually delete everything instead). Add file-manager.yml with:

soft-delete: true