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 4543670
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:33:49+00:00 2026-05-21T15:33:49+00:00

My webhost is Heroku, which does not allow files to be saved to the

  • 0

My webhost is Heroku, which does not allow files to be saved to the local file system. Therefore, I am using Carrierwave to store my files onto Amazon S3.

In the console, I notice when I do:

Photo.last.attachment.url

It returns:

 => "https://foobar.s3.amazonaws.com/uploads/users/1/photos/7/foo.jpg" 

As expected. However, this process (of returning the value) in the console takes up 2-3 seconds. My guess is that it it trying to access S3. Even worst, when I load a web page with several photos, it takes quite a while to load.

Someone mentioned that because I am remotely storing my files via S3, I should cache the result from “Photo.last.attachment.url“.

This means, in my db I would need to have two columns:

:attachment and :attachment_url

:attachment would be for the Carrierwave uploader object and :attachment_url would be the link to the S3 file directly.

Is this what I should be doing? Is there a better alternative?

  • 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-21T15:33:50+00:00Added an answer on May 21, 2026 at 3:33 pm

    This is fixed in a recent version of Carrierwave. Better not to cache, URL creation is cheap. It was a behavior of Fog to check for the file when creating the URL. Now the behavior is to simply give the link. You can see this discussion:
    https://github.com/jnicklas/carrierwave/issues/289 and
    https://github.com/jnicklas/carrierwave/issues/261

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

Sidebar

Related Questions

I'm trying to publish my website on a webhost which using plesk panel but
Currently I'm using shared webhost (Linux) to host my site. I know that anything
For some Webhost issues I have to write a file backup/syncronisation tool for a
I'm using Rackspace's Cloud Sites as a webhost and, for a site that uses
Hello I am not super experienced with PHP and large projects using it, most
My webhost has rules against socket servers so I've been looking into GAE. Does
I've got a PHP script on a shared webhost that selects from ~300 'feeds'
http://www.codeplex.com/IIRF/Thread/List.aspx My webhost installed IIRF for me and I am convinced that they did
My webhost automatically forwards all requests to *.mydomain.com to the toplevel domain mydomain.com. I
I use the free webhost 000webhost. The service is okay but it inserts some

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.