app/models/caboose/media.rb in caboose-cms-0.6.24 vs app/models/caboose/media.rb in caboose-cms-0.6.25

- old
+ new

@@ -51,17 +51,15 @@ self.file = URI.parse(uri) end self.processed = true self.save - # Set the downloadable file names - #bucket = AWS::S3::Bucket.new(bucket) - #['tiny', 'thumb', 'large'].each do |style| - # obj = bucket.objects["media/#{self.id}_#{style}#{ext}"] - # obj.content_disposition = 'attachment; filename="' + self.name + '"' - # obj.store - #end - + # Remember when the last upload processing happened + s = Setting.where(:site_id => self.media_category.site_id, :name => 'last_upload_processed').first + s = Setting.create(:site_id => self.media_category.site_id, :name => 'last_upload_processed') if s.nil? + s.value = DateTime.now.utc.strftime("%FT%T%z") + s.save + # Remove the temp file bucket = AWS::S3::Bucket.new(bucket) obj = bucket.objects[key] obj.delete