protected function moveTemporaryFile($strFile, $strDestination)
    {
        if (!is_file(TL_ROOT . '/' . $strFile)) {
            return '';
        }

        // Do not store the file
        if (!$this->arrConfiguration['storeFile']) {
            return $strFile;
        }

        // The file is not temporary
        if (stripos($strFile, $this->strTemporaryPath) === false) {
            return $strFile;
        }

        $strNew = $strDestination . '/' . basename($strFile);

        // Do not overwrite existing files
        if ($this->arrConfiguration['doNotOverwrite']) {
            $strNew = $strDestination . '/' . $this->getFileName(basename($strFile), $strDestination);
        }

        $blnRename = \Files::getInstance()->rename($strFile, $strNew);

        \Files::getInstance()->chmod($strNew, \Config::get('defaultFileChmod'));

        // Add the file to Dbafs
        if ($this->arrConfiguration['addToDbafs'] && $blnRename) {
            $objModel = \Dbafs::addResource($strNew);

            if ($objModel !== null) {
                $strNew = $objModel->uuid;
            }
        }

        return $strNew;
    }