Skip to content

Implement GridFS upload streams and helpers #127

Description

@schapman1974

Support chunked file uploads through PyMongo-shaped APIs.

Initial API:

  • open_upload_stream
  • open_upload_stream_with_id
  • upload_from_stream
  • upload_from_stream_with_id

Acceptance criteria:

  • Accept bytes, file-like streams, and incremental writes.
  • Split content into numbered chunk documents using the configured chunk size.
  • Write the file metadata only after a successful upload.
  • Abort cleanly and remove partial chunks after errors or explicit abort.
  • Enforce filename, metadata, identifier, BSON, and chunk-size validation.
  • Return compatible file identifiers and stream properties.
  • Add empty, exact-boundary, multi-chunk, and interrupted-upload tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibilityMongoDB and PyMongo behavioral compatibilityenhancementgridfsMongoDB GridFS compatibilityroadmapPlanned roadmap work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions