foto exif

This commit is contained in:
Andreas Stephanides
2015-04-07 23:19:27 +02:00
parent bd7aac9bb7
commit b04b23e647
4 changed files with 27 additions and 1 deletions

View File

@@ -32,9 +32,12 @@ class FotoUploader < CarrierWave::Uploader::Base
# end
# general settings
process :fix_exif_rotation
process :store_exif
process :strip
process :convert => 'jpg'
# Create different versions of your uploaded files:
version :thumb do
@@ -62,5 +65,9 @@ class FotoUploader < CarrierWave::Uploader::Base
# "something.jpg" if original_filename
# end
def store_exif
img = Magick::Image.read(current_path)
model.exif=img.first.get_exif_by_entry().to_json
end
end