Skip to content

Downloads should use files on disk instead of bytes in RAM #37

@hoh

Description

@hoh

Downloading files currently stores everything in RAM, doing so in a new BytesIO object.

We should change the definition of the function or create a new one that saves the data on disk.

My proposal is to ask the user to pass a file-like object the function can write to.

This file-like object can be a buffer in memory, a file on disk or anything compatible with the interface.

For convenience, we could make that argument optional and return a NamedTemporaryFile if it is None.

Originally posted by @hoh in #36 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions