public function actionFilemanagerUpdateCaption()
    {
        $this->checkRouteAccess(self::PERMISSION_ROUTE);
        
        $fileId = Yii::$app->request->post('id', false);
        $captionsText = Yii::$app->request->post('captionsText', false);
        $pageId = Yii::$app->request->post('pageId', 0);
    
        if ($fileId && is_scalar($fileId) && $captionsText) {
            $model = StorageFile::findOne($fileId);
            if ($model) {
                $model->updateAttributes([
                    'caption' => I18n::encode($captionsText),
                ]);
    
                $this->flushApiCache($model->folder_id, $pageId);
    
                return true;
            }
        }
    
        return false;
    }