Skip to content

[Feature]: msteams support resumable Graph upload session for files >4MB #13243

@0xRaini

Description

@0xRaini

Summary

MS Teams file upload currently relies on simple PUT upload and has a documented gap for files larger than 4MB.

Why this matters

  • Real-world assistant workflows frequently produce files >4MB (screenshots, PDFs, logs, exports).
  • Current behavior likely fails for a common size band and degrades delivery reliability in Teams channels/chats.

Evidence

extensions/msteams/src/graph-upload.ts includes:

  • comment: simple upload up to 4MB
  • TODO: For files >4MB, implement resumable upload session.

Expected behavior

Uploads above 4MB should automatically switch to Graph upload session flow, chunking and committing successfully.

Suggested fix

  • Add createUploadSession path for >4MB buffers.
  • Implement chunked upload with retry/backoff for transient 429/5xx.
  • Keep existing small-file fast path for <=4MB.
  • Add tests for boundary cases (just below/above 4MB, retry, final commit failure).

Scope

extensions/msteams/src/graph-upload.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions