binary testing
This commit is contained in:
parent
4dafe27067
commit
134305243a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue