public function runStep($step)
{
if (is_array($this->_paths)) {
$path = $this->_paths[$step];
} else {
$path = $this->_paths;
}
// Run TinyPNG
craft()->imager->runMozjpeg($path);
// if AWS is enabled, upload file
if (craft()->imager->getSetting('awsEnabled')) {
try {
craft()->imager_aws->uploadToAWS($path);
} catch (\Exception $e) {
ImagerPlugin::log("Upload to AWS failed for {$path} in Imager_MozjpegTask: " . $e->getMessage(), LogLevel::Error);
}
}
return true;
}