Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store zip file to s3 only without streaming #117

Open
kevinlau-drewberry opened this issue Jul 16, 2024 · 1 comment
Open

store zip file to s3 only without streaming #117

kevinlau-drewberry opened this issue Jul 16, 2024 · 1 comment

Comments

@kevinlau-drewberry
Copy link

kevinlau-drewberry commented Jul 16, 2024

hi, understand the purpose of this package is to stream zip files. However, I am not able to find an alternative package.

Is it possible to only store the zip file to s3 without downloading it right away?

        $zip = Zip::create($filename)->setPath($path);
        foreach($files as $file)
        {
            $zip->add(
                File::make($file->{ContentVersion::CUSTOM_FIELD_URL},$file->{ContentVersion::FIELD_PATHONCLIENT})
                      ->setFilesize($file->{ContentVersion::FIELD_CONTENTSIZE})
            );
        }
        $zip->saveToDisk('s3', $path);

I can save the zip to s3 but it forced me to download it as well.

@jszobody
Copy link
Member

Hmm, that should be possible. I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants