Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.make_zip_io
- cmd = "sh -c 'cd /somewhere && zip -r - stuff'"
- IO.popen(cmd)
- end
- def zip
- io = self.class.make_zip_io
- send_data(io.read, :filename => 'filename.zip', :type => 'application/zip')
- end
Add Comment
Please, Sign In to add comment