Skip to content

Instantly share code, notes, and snippets.

@mariuswilms
Created April 28, 2009 15:44
Show Gist options
  • Save mariuswilms/103218 to your computer and use it in GitHub Desktop.
Save mariuswilms/103218 to your computer and use it in GitHub Desktop.
<?php
class Attachment extends AppModel {
// ...
function beforeMake($file, $process = array()) {
extract($process);
if ($this->alias == 'Avatar' && $version != 's') {
return true;
}
if ($version != 'xs') {
return ClassRegistry::init('Queue.Job')->put(compact('file', 'process'));
}
if ($name == 'Image') {
return $this->_myCustomResizeMethod($file, $instructions);
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment