Skip to content

Presign leaks S3 multipart uploads when a later step fails #38

Closed

Description

@Hiczownik

Where: src/FileHolder.Infrastructure/Services/FileGroupService.cs:90

Presign starts S3 multipart uploads one file at a time before SaveChangesAsync. If a later Initiate call or the DB save fails (for example because of the 255-character name overflow), the uploads already started have no MultipartUploadSession row, so the purge never aborts them. Their parts stay in MinIO forever.

Suggested fix: on failure, abort the multipart uploads already started (try/catch), or save the session rows before initiating.

Found during a code review of the whole src tree.

Activity

  1. added
    bugSomething isn't working
    backend.NET API and services
    storageObject storage, purge, multipart
    P2Priority 2: real failure in rarer cases
    on Oct 20, 2026
  2. added a commit that references this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority 2: real failure in rarer casesbackend.NET API and servicesbugSomething isn't workingstorageObject storage, purge, multipart

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions