protected function getReplaceFileAction($record)
    {
        // Check if record exists and user has correct permissions
        if (!$record || !$record->isInDB() || !$record->canEdit()) {
            return null;
        }

        $action = FormAction::create('replacefile', _t(__CLASS__ . '.REPLACE_FILE', 'Replace file'))
            ->setIcon('upload');

        return $action;
    }