Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
use file size of the io adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Stämpfli committed Apr 3, 2012
1 parent dc2c81c commit 49499c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/paperclip-meta/attachment.rb
Expand Up @@ -33,7 +33,7 @@ def post_process_styles_with_meta_data(*style_args)
@queued_for_write.each do |style, file|
begin
geo = Geometry.from_file file
meta[style] = {:width => geo.width.to_i, :height => geo.height.to_i, :size => File.size(file) }
meta[style] = {:width => geo.width.to_i, :height => geo.height.to_i, :size => file.size }
rescue NotIdentifiedByImageMagickError => e
meta[style] = {}
end
Expand Down Expand Up @@ -88,4 +88,4 @@ def meta_decode(meta)
end
end
end
end
end

0 comments on commit 49499c7

Please sign in to comment.