Permalink
Browse files

remove resizeAndCropped files

  • Loading branch information...
madhums committed Sep 8, 2012
1 parent 1964bf8 commit 97f51074731e1a065d5dce2ad0f4b96fdedb0177
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/imager.js
View
@@ -266,6 +266,16 @@ Imager.prototype.prepareRemove = function (file, iteratorCallback, variant) {
})
}
+ if (variants.resizeAndCrop) {
+ Object.keys(variants.resizeAndCrop).forEach(function (preset) {
+ var removeFiles = function (cb) {
+ self['removeFrom' + self.storage](file, preset, cb)
+ }
+
+ asyncArr.push(removeFiles)
+ })
+ }
+
async.parallel(asyncArr, function (err, results) {
iteratorCallback(err)
})

0 comments on commit 97f5107

Please sign in to comment.