Skip to content

improvements to file upload handling #20

Done

Description

@shcheklein

Activity

  1. added
    documentation
    enhancement
    good first issue
    help wanted
    bug
    on Mar 25, 2020
  2. self-assigned this
    on Jun 6, 2020
  3. removed their assignment
    on Jul 30, 2020
  4. shcheklein commented on Nov 28, 2026

    @shcheklein
    MemberAuthor

    The upload ownership and documentation work is complete on main for 2.0. SetContentFile(path) closes the file PyDrive2 opened after a successful upload or when its content is replaced. A failed upload keeps the handle open for a retry. If you abandon the retry, file.content.close() releases it immediately.

    To upload a file object you already own, assign a seekable binary stream to file.content and call file.Upload() inside your own with block. The guide includes a working example, and the tests cover ownership, replacement, and retries. Closing as addressed by #410 and #418. Upload guide · Regression tests

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

    bugdocumentationenhancementgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions