milesj / uploader

[Deprecated] A CakePHP plugin for file uploading and validating.
MIT License
193 stars 73 forks source link

New setting: "cleanup" #158

Closed catearcher closed 11 years ago

catearcher commented 11 years ago

There are situations where you do not want to delete a previously uploaded file when uploading a new one into the same column. A simple example would be a project where the customer wants an archive of all photos that have been uploaded by the application's users, including those that have been uploaded or replaced.

This problem could be solved with a file versioning table, but that is usually unnecessarily complicated.

I therefore added a new setting "cleanup" which, if set to false, prevents the old file from being deleted during cleanup.

milesj commented 11 years ago

How would they have a reference to the previous image then? It would just leave legacy files all over the place.

catearcher commented 11 years ago

They never ask for any reference. They just want a zip archive of any and all images that have been uploaded during the campaign (though I have no idea why exactly). It's usually enough to put the uploaders' name and/or ID into the file name, though most of the time they don't even need that.

I currently also have another special case (which is a bit hard to explain in detail) involving image manipulation and composition from multiple images where I don't need a table, but only the path of the must currently uploaded file, as well as all the uploaded files themselves (the ones I need are in a separate folder).

I normally just add the "cleanup" option myself for every project I do, but since an estimated 20 to 30% of all projects I did in the last year had me needing this option for one or several columns, I started to think I might not be the only one. ;-)

milesj commented 11 years ago

Don't see a real reason not to, up to the implementer at that point. Cheers!