py7zr icon indicating copy to clipboard operation
py7zr copied to clipboard

Uploading object to S3

Open quell01102022 opened this issue 1 year ago • 1 comments

Hey, so i can see i can use extract and extractall to write to filesystem. But i need an extracted object to write to S3 Bucket like here:

with py7zr.SevenZipFile("file.7z", "r") as archive:
    for image in archive.namelist():
        s3resource.meta.client.upload_fileobj( archive.open(image), Bucket="bucket", Key="key")



# in zipfile, i can use archive.open() for example, how can i achieve same here?

quell01102022 avatar Aug 23 '24 12:08 quell01102022

Use .read()

Ravencentric avatar Aug 24 '24 21:08 Ravencentric