I am on a photo-sharing site and I want to provide functionality to upload all the images available in the gallery. I took the gallery with respect to where I can get all iamges at @ gallery.uploads,
Now I want to download all the files or, if possible, create any zip file so that we can download this file with downloads inside the gallery,
thank
Use rubyzip gem to create server side zip files:
rubyzip
require 'zip/zip' Zip::ZipFile.open("my.zip", Zip::ZipFile::CREATE) { |zipfile| puts zipfile.read("first.txt") zipfile.remove("first.txt") }
zip sendfile rails . Zip::Zipfile sendfile .
sendfile
Zip::Zipfile
Source: https://habr.com/ru/post/1735903/More articles:Removing identical files on UNIX - unixHow can I interact with fairly long python scripts? - pythonCan someone explain how JSON partners work without using eval? - jsonJavascript: prototype numbers - javascriptXML deserialization issue (attribute with namespace) - c #Website not working while loading important files - phpProblem integrating Wordpress blog into CakePHP site - phpxml invalid character in this encoding - c #SharePoint - Cannot complete this operation. Contact your administrator - sharepointQuestion Qt Qbrush - colorsAll Articles