http://rubyzip.sourceforge.net/
gem install rubyzip
Some example I found:
OUTDIR="out"
Zip::ZipFile::open("all.zip") { |zf|
zf.each { |e|
fpath = File.join(OUTDIR, e.name)
FileUtils.mkdir_p(File.dirname(fpath))
zf.extract(e, fpath)
}
}
Software that uses rubyzip so you can look at examples are amongst
other Mephisto
http://svn.techno-weenie.net/projects/mephisto/
On 8/3/06, David Sulc <davidsulc@gmail.com> wrote:> Hi !
>
> I''m attempting to write a simple gallery in Rails. The thing is
I''d like to
> be able to upload a lot of pictures at once with a zip file.
>
> I''ve so far managed to upload the zip file (containing pictures)
to the
> server. But how do I unzip the file to have access to the pictures ? I
> haven''t been able to understand how to use Zlib to do this.
>
> Any tips or ideas welcome, especially if you have a better way of
> accomplishing what I''d like to do...
>
> Best regards,
>
> David Sulc
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
--
--------------
Jon Gretar Borgthorsson
http://www.jongretar.net/