I want to make an alternative download using amazon s3
I use http://amazon.rubyforge.org/ gem
I tried
object = AWS::S3::S3Object.find 'myfile.zip', 'mybucket'
send_data ob.value, :filename => 'myfile.zip'
and works, it is downloaded the file.
The problem is, if the file is bigger (ie: 10mb or greater), I have to
wait until all object is loaded (all data is downloaded from S3), then
it's prompt me, the save file dialog.
How can I improve this ?
Thanks
--
Posted via http://www.ruby-forum.com/.
Does that work for you?
--
James Mitchell
Thanks James for your fast reply.
I don't think if it worked form me in that way. If the file have 100mb,
the user must wait a lot of time until it's downloaded.
I saw this working at peepcode.com (when you download a screencast)
>>
>> James Mitchell
>
> Thanks James for your fast reply.
> I don't think if it worked form me in that way. If the file have
> 100mb,
> the user must wait a lot of time until it's downloaded.
> I saw this working at peepcode.com (when you download a screencast)
I think this rails' fault: the response won't get out to the user's
web browser until rails has finished, whereas what you want to do is
to stream it. Not sure how you get round this.
Fred