From 134305243aa4bce809b928df85a11297fe508451 Mon Sep 17 00:00:00 2001 From: Espen Antonsen Date: Mon, 15 Jun 2009 01:15:22 +0200 Subject: [PATCH] binary testing --- app/models/photo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/photo.rb b/app/models/photo.rb index 0137d97..a40cc68 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -82,7 +82,7 @@ class Photo < ActiveRecord::Base data.content_type = MIME::Types.type_for(data.original_filename) self.title = data.original_filename self.path = self.album.path + "/" + data.original_filename - File.open(APP_CONFIG[:photos_path] + self.path, :encoding => 'BINARY' ) { |f| f.write(data.read) } + File.open(APP_CONFIG[:photos_path] + self.path, 'w:binary') { |f| f.write(data.read) } RAILS_DEFAULT_LOGGER.info('swf_uploaded_data done') end