unprotected photo.path. updated readme

rails2
Espen Antonsen 2009-06-09 00:50:25 +02:00
parent b0bf62c420
commit 69936b9622
2 changed files with 12 additions and 2 deletions

9
README
View File

@ -38,4 +38,11 @@ Put photos in containing folders(albums) in the specified gallery folder. This f
./trip to iran/mosque in yazd.jpg
./trip to iran/powder snow in dizin.jpg
Each folder => album
Every time you manually add photos to disk you must run:
require "scan"
ScanFiles.FullScan
In future releases this will be automated.
Uploads will be written to the database and thus no need to manually scan the folders.

View File

@ -15,7 +15,7 @@ class Photo < ActiveRecord::Base
before_destroy :destroy_file
attr_accessor :tag_list
attr_protected :path
#attr_protected :path
named_scope :untouched, :conditions => "Photos.description IS NULL AND Photos.Id NOT IN ( SELECT Photo_ID FROM Photo_Tags)", :include => :album
@ -109,6 +109,9 @@ class Photo < ActiveRecord::Base
end
def exif_read
puts "exif"
puts self.path
puts self.path_original
photo = MiniExiftool.new(self.path_original)
self.longitude = photo.GPSLongitude if self.longitude.nil?
self.latitude = photo.GPSLatitude if self.latitude.nil?