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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:23:07+00:00 2026-05-16T04:23:07+00:00

has_attached_file :image, :storage => :s3, :s3_credentials => #{RAILS_ROOT}/config/s3.yml, :path => /:style/:filename I’m not sure

  • 0

has_attached_file :image, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => "/:style/:filename"

I’m not sure what :path => "/:style/:filename" is.

I also want to to include the style for this attached image, is that what the :path is?
the style I want is this: :styles => { :medium => "275x275>", :thumb => "175x155>" }

Basically what’s going on here is that I’m setting up on heroku and I’m having to use S3 which seems straightforward just not used to this attachment convention stuff.

Also, I just signed up for an S3 account… but heroku was spouting that its free or something. What’s the deal with that?

  • 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-16T04:23:07+00:00Added an answer on May 16, 2026 at 4:23 am

    The ‘path’ specifies the location on S3 where the files will be stored. Thus, if you specify an attachment as:

     has_attached_file :image, 
        :styles => { :medium => "275x275>", :thumb => "175x155>" },
        :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/amazon_s3.yml",
        :path => "user/:attachment/:style/:id.:extension"
    

    A sample URL will be:

    http://s3.amazonaws.com/bucket/user/image/thumb/347853856.jpg

    Finally, S3 is NOT free (Heroku simply states transfer / uploads are not counted in the usage based calculations). Heroku’s documentation is excellent if you need further information.

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

Sidebar

Related Questions

My paperclip path in the model is: has_attached_file :image, :path => :rails_root/app/assets/images/article_images/:id/:style_:basename.:extension But when
In my model I have: has_attached_file :image, :storage => :s3, :styles => { :original
image/png [paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /var/folders/0f/hgplttnd7dg6q9m62qtbnpn00000gn/T/stream20120120-99159-ji1e70.png is not recognized by
I storing images using paperclip + S3 has_attached_file :image, :whiny => false, :styles =>
my model: has_attached_file :avatar, :styles => { :thumb => 65x65> }, :storage => :s3,
I have a model that has an image attached to it that I want
I'm saving an image upload using Paperclip in Rails, which is working fine. has_attached_file
class User < ActiveRecord::Base has_attached_file :photo, :styles => { :square => 100%, :large =>
I want to know if the system has a attached webcam. How should i
I want to check if a Dom has class value attached to it.. Since

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.