Skip to content

Stream into stream #80

@1oglop1

Description

@1oglop1

Hi, thank you for the inspirational code.

I'm wondering if it's possible to adapt your code and make it compatible with S3 storage.

I use django-storages and boto3 client returns a streaming body (already open fp) and all metadata.

I need a zipfile (or any other archive) to be created from the set of files during the GET request (not great but it has to be).

So to save the memory I have 2 options.

  1. Use zipfly as is and download files into a temporary location (and remove it after the operation)
  2. Or better solution that doesn't require intermediate storage so I could pipe the content of streaming body into zipfly and return that as a streaming response.

streaming body (many of them) -> zipfly(zip file) -> streaming response

Do you think that option two is possible?
If so, could you please point out what pieces of code I should focus on to adapt zipfly?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions