public static function replaceFile($fileName, $newFileSource, $newFileName)
    {
        try {
            Yii::$app->storage->ensureFileUpload($newFileSource, $newFileName);
        } catch (\Exception $e) {
            return false;
        }

        return Yii::$app->storage->fileSystemReplaceFile($fileName, $newFileSource);
    }