public function addFile($fileSource, $fileName, $folderId = 0, $isHidden = false)
    {
        $fileData = $this->ensureFileUpload($fileSource, $fileName);

        $fileHash = FileHelper::md5sum($fileSource);

        $newName = implode([$fileData['secureFileName'].'_'.$fileData['hashName'], $fileData['extension']], '.');

        if (!$this->fileSystemSaveFile($fileSource, $newName)) {
            return false;
        }

        $model = new StorageFile();
        $model->setAttributes([
            'name_original' => $fileName,
            'name_new' => $fileData['secureFileName'],
            'name_new_compound' => $newName,
            'mime_type' => $fileData['mimeType'],
            'extension' => $fileData['extension'],
            'folder_id' => (int) $folderId,
            'hash_file' => $fileHash,
            'hash_name' => $fileData['hashName'],
            'is_hidden' => $isHidden ? true : false,
            'is_deleted' => false,
            'file_size' => $fileData['fileSize'],
            'caption' => null,
        ]);

        if ($model->validate()) {
            if ($model->save()) {
                $this->deleteHasCache(self::CACHE_KEY_FILE);
                $this->_filesArray[$model->id] = $model->toArray();
                return $this->getFile($model->id);
            }
        }
        return false;
    }