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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:14:06+00:00 2026-05-26T19:14:06+00:00

When using paperclip, if i try to enter the url like so (in a

  • 0

When using paperclip, if i try to enter the url like so (in a create function after a picture saves

image = Magick::ImageList.new('public' + @picture.photo.url)

i get the error

Magick::ImageMagickError in PicturesController#create

no decode delegate for this image format `public/system/photos/115/original/Kitchener-2011103100531.jpg?1321026621' @ error/constitute.c/ReadImage/532

if i try to enter

@picture.latitude = EXIFR::JPEG.new('public' + @picture.photo.url).gps_lat

to just deal with the exif data i get

Errno::ENOENT in PicturesController#create

No such file or directory - public/system/photos/116/original/Kitchener-20111031-00531.jpg?1321026744

When i try doing photo.url in a rails console it gives good format, but in my controller adds some weird garbage ‘?1321026621’ at the end. How do i fix this? (a regex looks easy to fix this, but is there a better approach than this)

  • 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-26T19:14:07+00:00Added an answer on May 26, 2026 at 7:14 pm

    From the paperclip github project:

    https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/attachment.rb

    # Returns the public URL of the attachment with a given style. This does
    # not necessarily need to point to a file that your Web server can access
    # and can instead point to an action in your app, for example for fine grained
    # security; this has a serious performance tradeoff.
    #
    # Options:
    #
    # +timestamp+ - Add a timestamp to the end of the URL. Default: true.
    # +escape+    - Perform URI escaping to the URL. Default: true.
    #
    # Global controls (set on has_attached_file):
    #
    # +interpolator+  - The object that fills in a URL pattern's variables.
    # +default_url+   - The image to show when the attachment has no image.
    # +url+           - The URL for a saved image.
    # +url_generator+ - The object that generates a URL. Default: Paperclip::UrlGenerator.
    #
    # As mentioned just above, the object that generates this URL can be passed
    # in, for finer control. This object must respond to two methods:
    #
    # +#new(Paperclip::Attachment, Paperclip::Options)+
    # +#for(style_name, options_hash)+
    def url(style_name = default_style, options = {})
      default_options = {:timestamp => @options.use_timestamp, :escape => true}
    
      if options == true || options == false # Backwards compatibility.
        @url_generator.for(style_name, default_options.merge(:timestamp => options))
      else
        @url_generator.for(style_name, default_options.merge(options))
      end
    end
    

    By default paperclip appends a timestamp parameter, pass :timestamp => false to the url method of your attachment:

    image = Magick::ImageList.new('public' + @picture.photo.url(:original, :timestamp => false))
    
    # => "public/system/photos/115/original/Kitchener-2011103100531.jpg"
    

    Edit: Actually, looks like they changed the option name since this didn’t work for me with Paperclip 2.4.0. After inspecting my own source, the option is :use_timestamp but on github it’s :timestamp – choose which one depending on the version of Paperclip you’re using.

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

Sidebar

Related Questions

Using Paperclip, I want to grab an image from a URL like this: require
I am using paperclip to upload an image and an audio file but I
I'm using paperclip to handle image uploads to rails. it worked fine on my
I have a model that is using Paperclip to manage the file. After I
I'm trying to write a test for a model with a picture, using paperclip.
When I try to upload a photo in Ruby on Rails using Paperclip on
I'm using Paperclip / S3 for file uploading. I upload text-like files (not .txt,
I'm using Paperclip to handle avatar's for users and currently set a default image
I am using Paperclip and S3 for image uploads and am trying to stub
I am using Paperclip for uploading the Profile image in my application (rails) 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.