josegonzalez/upload — pull request #111 by benjaminallison (2013-03-15 14:27:48+00:00)
Title: Update UploadBehavior.php

Made most of Jose's recommendations. Still some work to do, but getting there.

A few notes:

1) I've name spaced folders to an array like Jose recommended... and I'm sending the array to my deletion script, by plucking based on model alias... is this a correct approach?

$this->deleteFolder($options['path'], $this->__foldersToRemove[$model->alias]);

2) I'm not sure what you had in mind for folder deletion error suppression. You mean if a folder is not present, but deletion is attempted? Right now, if a file does not exist (let's say a thumbnail got deleted manually in FTP), the script will crash. In most cases, the assumption is that people are not manually editing the actually files on disk, and is letting the Upload Behavior handle all the file management.

Thoughts?