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

  • SEARCH
  • Home
  • 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 6678355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:13:58+00:00 2026-05-26T04:13:58+00:00

Is it possible to rename a file name before user right-click’s + save as

  • 0

Is it possible to rename a file name before user right-click’s + save as with Carrierwave + S3 + Heroku + Content-Disposition? I’m thinking of sanitizing file names (e.g. 193712391231.flv) before the file is saved on the S3 server and saving the original file name in a column in the db.

When a user decides to download the file (right-click and save as). I can’t serve / send it as 193712391231.flv. Instead, I would like to send the file with its original file name.

How can this be implemented?

Using Carrierwave. I’ve come across this:

uploaded = Video.first.attachment
uploader.retrieve_from_store!(File.basename(Video.first.attachment.url))
uploader.cache_stored_file!

send_file uploader.file.path

This wont be served by S3, because it first caches the file in the local filesystem and then sends it to the browser. Which takes up a whole web process (Dyno in Heroku).

If anyone has any ideas, please suggest.

  • 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-26T04:13:58+00:00Added an answer on May 26, 2026 at 4:13 am

    If you’re sending the file to the user direct from S3 you’ve no option. If you route the file through a dyno you can call it what you want, but you’re using a dyno for the entire duration of the download.

    I would store the files in a user friendly manner where possible and use folders to organise them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to get the file name which is being executed. Like e.g.
Is it possible to rename file when trying to download it? For example, I
Is it only possible if I rename the file? Or is there a __module__
Is it possible to change the name of an already open memory mapped file,
Is it possible to rename all the tabs in a jQuery UI tab control?
Is it possible to rename a list in Sharepoint 2007 using the web interface?
Is it possible to rename a report section in a crystal reports using the
Is it possible to rename a MySQL table? If so, how?
I want to make a .bat to copy & rename a file multiple times.
Possible Duplicate: How do I rename a project in Xcode? Hi I am tying

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.