protected function _prepareImageName($sValue, $sType, $blDemo, $sImagePath, $blUnique = true)
    {
        if ($sValue) {
            // add type to name
            $aFilename = explode(".", $sValue);

            $sFileType = trim($aFilename[count($aFilename) - 1]);

            if (isset($sFileType)) {
                $oStr = getStr();

                // unallowed files ?
                if (in_array($sFileType, $this->_aBadFiles) || ($blDemo && !in_array($sFileType, $this->_aAllowedFiles))) {
                    \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("File didn't pass our allowed files filter.");
                }

                // removing file type
                if (count($aFilename) > 0) {
                    unset($aFilename[count($aFilename) - 1]);
                }

                $sFName = '';
                if (isset($aFilename[0])) {
                    $sFName = $oStr->preg_replace('/[^a-zA-Z0-9()_\.-]/', '', implode('.', $aFilename));
                }

                $sValue = $this->_getUniqueFileName($sImagePath, "{$sFName}", $sFileType, "", $blUnique);
            }
        }

        return $sValue;
    }