troubleshooting Question

how to get a paperclip style file_size

Avatar of lusfernandos
lusfernandos asked on
5 Comments1 Solution1779 ViewsLast Modified:
Hi I am using paperclip to deal with images files, and I want to show in a list the file size of a style.
My styles are:
    :styles => {:small => "200x200>", :medium => "300x300>", :thumb => "60x60>"}

In a view I am getting the image original size, however I want to show the :medium filesize
Here is how I am showing in the view

    <td><%=h number_to_human_size(photo.photo_file_size)%></td>

I guess that I need to use (:medium) somewhere but I don't know where, or if I really need to use some other function to get the style size, I think the only size paperclip stores is from the original image.
Thanks for your support.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros