Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:43:15+00:00 2026-05-25T09:43:15+00:00

Well my problem is that I’m using send_data on my Rails 3 application to

  • 0

Well my problem is that I’m using send_data on my Rails 3 application to send to the user a file from AWS S3 service with something like

Base.establish_connection!( :access_key_id => 'my_key', :secret_access_key => 'my_super_secret_key')
s3File = S3Object.find dir+filename, "my_unique_bucket"
send_data(open(s3File.url).read,:filename=>filename, :disposition => 'attachment')

but seems like the browser is buffering the file and before buffering it sends the file to download taking no time on the download but at the buffering time it’s taking as long as the file size …. but what i need is the user to view the download process as normal, they won’t know what happening with the loader only on the browsers tab:

enter image description here

They’d rather see a download process i guess to figure out there’s something happening there

is there any way i can do this with send_data?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:43:15+00:00Added an answer on May 25, 2026 at 9:43 am

    It’s not the browser that’s buffering/delaying, it’s your Ruby server code.

    You’re downloading the entire file from S3 before sending it back to the user as an attachment.

    It may be better to serve this content to your user directly from S3 using a redirect. Here’s a link to building temporary access URLs that will allow a download with a given token for a short period of time:

    http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html

    Base.establish_connection!( :access_key_id => 'my_key', :secret_access_key => 'my_super_secret_key')
    s3File = S3Object.find dir+filename, "my_unique_bucket"
    redirect_to s3File.url(:expires_in => 30)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem that the standard library doesn't solve well, and I'm
There is this well-known problem that browsers don't put Ajax request in the request
Well the problem here is that if you have one DataTemplate for a type
well the problem is that i am trying to get DDL to: 1. Recive
Well, this is the exact opposite problem that I normally have with Javascript synchronicity
Well I have an application that uses both Objective C & c++ but for
It is a well known problem that IE caches too much of html, even
I meet a problem that my page works well in firefox and chrome(almost the
Well problem was that my original input is: x=[['1', '7', 'gg'], ['1.5', '8', 'as']...]
I just suffer a problem that the all the things works well on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.