Hi All,
I want to download a file from my web application using/calling
ruby code.
Manually i can download reports by clicking on 'DOWNLOAD' button in my
app, which in turn gets the file from servlet path(where the files are
stored).
My question is, how can i automate this download part in ruby, if its
feasible.
During my googling, i found a set of ruby code to download pictures
from a site.
snippet of the code looks like this:
<CODE>
require 'net/http'
Thanks guys for the reply.
Actually i had mistaken that the download picks the file from web
server, but after talking to my developers i realized that they are
internally getting the file using ftp.
I wanted to know how can i "pull a file from ftp". Is there any ruby
library to pull or push files through "ftp"
On Wed, Apr 8, 2009 at 9:14 AM, Idealone Ideally <shekarls@gmail.com> wrote:
bwv549 wrote:
> yes, this should download any kind of file (including excel). I use
> it to read/write mp3 files from online:
>
> require 'open-uri'
> open("someplace.com) do |in_io|
> File.open("somefile.mp3", 'w') do |out_io|
> out_io.print in_io.read
> end
> end
Thanks guys for the reply.
Actually i had mistaken that the download picks the file from web
server, but after talking to my developers i realized that they are
internally getting the file using ftp.
I wanted to know how can i "pull a file from ftp". Is there any ruby
library to pull or push files through "ftp"