/** * Delete file (and its thumbnail if exists) from storage * * @param string $target File path to be deleted * @return Mage_Cms_Model_Wysiwyg_Images_Storage */ public function deleteFile($target) { if (!Mage::helper('uaudio_storage')->isEnabled()) { return parent::deleteFile($target); } $thumb = str_replace('//', '/', $this->getThumbsPath($target)) . DS . pathinfo($target, PATHINFO_BASENAME); $this->_getStorageModel()->deleteFile($target); $this->_getStorageModel()->deleteFile($thumb); return $this; }