Skip to content

[Feature Request] Add configurable max upload file size for skills (currently hardcoded at 20MB) #1153

Description

@clark-cant

Context

Currently, GoClaw enforces a hardcoded 20MB maximum file upload size for skill attachments. This limit cannot be configured or overridden by users or admins.

While 20MB is reasonable for most text-based skills and small assets, it becomes a bottleneck for:

  • Video-heavy skills — tutorial demos, product showcases, training materials
  • High-resolution image assets — print-ready banners, infographics, photo galleries
  • Large dataset uploads — CSV/Excel files with thousands of rows, database dumps for analysis
  • Audio files — podcast episodes, music tracks, voice training data
  • Document bundles — multi-chapter PDFs, presentation decks with embedded media

Current Behavior

File uploads exceeding 20MB are rejected at the skill ingestion layer with no configuration option to increase the limit. The 20MB cap is hardcoded and not exposed through any config file, environment variable, or Web UI setting.

Proposed Solution

Add a configurable max upload file size setting that can be adjusted at multiple levels:

Level 1: Global default (config/env)

skills:
  max_upload_size_mb: 20    # Default: 20MB

Or via environment variable:

GOCLAW_SKILLS_MAX_UPLOAD_SIZE_MB=50

Level 2: Per-skill override (skill metadata)

Allow individual skills to declare their own upload limit in SKILL.md frontmatter:

---
name: video-analysis
max_upload_size_mb: 100    # This skill accepts larger files
---

Level 3: Per-tenant override (admin setting)

Admins can set a custom limit per tenant via the Web UI or API:

PUT /api/v1/tenants/:id/settings
{ "skills_max_upload_size_mb": 50 }

Safety Constraints

Constraint Value Reason
Minimum 1MB Prevent accidental zero-limit
Default 20MB Current behavior, backward compatible
Maximum 500MB Prevent abuse, reasonable for self-hosted
Per-file limit Enforced Not aggregate across session
Disk quota check Before upload Reject if tenant storage quota exceeded

Web UI Configuration

Settings → Skills → Upload Limits
├── Global max upload size: [20 MB]
├── Per-skill overrides: [+ Add]
│   ├── video-analysis: 100 MB
│   └── pdf: 50 MB
└── Tenant override (admin): [50 MB]

Technical Considerations

  • Storage backend — larger files may need S3/cloud storage instead of local disk
  • Timeout handling — large uploads need longer timeout thresholds
  • Chunked uploads — consider resumable/chunked upload for files >50MB
  • Virus scanning — larger files take longer to scan; async scanning may be needed
  • Memory limits — ensure file processing (parsing, extraction) doesn't OOM on large files
  • Rate limiting — prevent abuse with per-user upload quotas alongside size limits

Implementation Considerations

  • Scope: Config layer + skill metadata + upload handler + Web UI
  • Breaking changes: No — default remains 20MB
  • Migration needed: New config field, new skill frontmatter field
  • Tests affected: Upload handler tests, skill loading tests, config validation

Priority

Medium — Blocks power users and enterprise customers who need to work with larger media files through skills.


Tóm tắt: Đề xuất thêm cấu hình cho phép thay đổi giới hạn upload file size cho skills (hiện tại cứng 20MB), hỗ trợ 3 level: global config, per-skill override, per-tenant override.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions