Created
August 25, 2014 17:38
-
-
Save tstachl/e741843620fefecc95ef to your computer and use it in GitHub Desktop.
Unzip to S3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Zip::ZipFile.open(zipfile) do |zip| | |
zip.each do |f| | |
path = File.join('/your/aws/path', f.name) | |
aws = AWS::S3.new.buckets['yourbucket'][path] | |
aws.write(file: zip.get_output_stream(f)) | |
aws_url = aws.public_url(secure: true).to_s | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment