Download Zip File

P

Paul Fraser

I have tried to use rio gem to download a zip file (in windows) but it
results in a corrupt d/l. I think this is because binary mode is not
available in rio.
So I am now trying to use open-uri

require 'open-uri'
f = open (url)

f is of class tempfile. How do I save this temp file to disk?
Does open-uri have a binary mode option, or is it the default?

Or is there a more elegant ruby way to d/l binary mode files ?

Thanks
Paul Fraser
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,269
Messages
2,571,348
Members
48,026
Latest member
ArnulfoCat

Latest Threads

Top