Skip to content

Guard remaining Minio call sites for DRS-backed document keys #34400

Closed

Description

@mruff-aeq

Problem

With client document uploads migrating from Minio to the Document Record Service (DRS, entity#34142 / entity#34180), the documents.file_key value can now be a DRS key ({documentClass}-{documentServiceId}, e.g. COOP-DS0000101951) instead of a Minio UUID. Two legal-api code paths still assume every file key is a Minio key:

  1. Static document downloads — GET .../filings/{filing_id}/documents/static/{file_key} (business_documents.py) always fetches from Minio. DRS-backed documents (continuation-in authorization files, director affidavits, continuation-out uploads) fail to download.
  2. Draft filing deletion — deleting a draft filing (business_filings.py delete_from_minio) always calls the Minio delete. DRS-backed uploads are never removed, leaving orphaned document records in the DRS.

Fix

Dispatch on the file key shape in both places, matching the pattern already used in filing validation and report serving: DRS-shaped keys go to the DRS (doc_service.get_document / doc_service.delete_document), all other keys go to Minio unchanged.

Related

Activity

  1. self-assigned this
    on Jul 28, 2026
  2. added
    Entities Team
    on Jul 28, 2026
  3. self-assigned this
    on Jul 29, 2026
  4. gunanagar commented on Aug 4, 2026

    @gunanagar
    Collaborator

    Tested, all Good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities Team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions