diff options
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | app/models/foi_attachment.rb | 2 |
2 files changed, 1 insertions, 2 deletions
@@ -48,7 +48,6 @@ gem 'zip' gem 'fast_gettext' gem 'gettext_i18n_rails' gem 'gettext' - gem 'globalize3', :git => 'git://github.com/globalize/globalize.git', :ref => '5fd95f2389dff1' gem 'locale' gem 'routing-filter' diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb index 914420a2b..acbfc8a34 100644 --- a/app/models/foi_attachment.rb +++ b/app/models/foi_attachment.rb @@ -69,7 +69,7 @@ class FoiAttachment < ActiveRecord::Base tries = 0 delay = 1 begin - binary_data = File.open(self.filepath, "rb" ).read + binary_data = File.open(self.filepath, "rb" ){ |file| file.read } if self.content_type =~ /^text/ @cached_body = convert_string_to_utf8_or_binary(binary_data, 'UTF-8') else |