Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I download a large file from Amazon S3 through my Rails server, progressively
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COI am using right_aws. I tried this: `s3 = RightAws::S3Interface.new(aws_access_key, aws_secret_key, :port => 80, :protocol => "http") file = File.new('large.file', 'wb') res = s3.get(bucket_name, file_name) do |chunk| file.write(chunk) end`. I was able to download the file in chunk but how will I send it to the browser in real-time as one piece of file? How will I sync it? Any ideas? Any help will be highly appreciated! Thanks!
      singulars
    2. COI download the file in chunks in a thread on the server. How can I send the data to the client until that thread finishes? I tried to send the file but it sends only a small amount of it. I need it sending continuously until the whole file is downloaded the the server. Can this be done? Can I somehow request the file in byte-ranges smaller that the byte ranges that my file is being downloaded to the server meanwhile?
      singulars
    3. COYou get no benefit from using x_send_file if your rails process needs to be locked, you might as well return an iterator and set headers so that browser knows it needs to download the file instead of rendering it inline (http://stackoverflow.com/questions/3507594/ruby-on-rails-3-streaming-data-through-rails-to-client) However, you probably don't want to lock your rails process with this kind of action, try thinking of an option that has the client download the file directly from S3
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload