diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-06-18 12:55:11 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-06-18 12:55:11 +0100 |
commit | 89459d3902583fa3d6dad78462d2bf2fa6f94db6 (patch) | |
tree | dbd1a4cb6e361d8470ed2917403bc07a323d4c71 /app/controllers/api_controller.rb | |
parent | 1ff635e834c004600faa445fc53e757996cde30d (diff) |
API controller tests all pass
Diffstat (limited to 'app/controllers/api_controller.rb')
-rw-r--r-- | app/controllers/api_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index c1156845d..524aa44b7 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -139,11 +139,11 @@ class ApiController < ApplicationController attachment_hashes = [] (attachments || []).each_with_index do |attachment, i| filename = File.basename(attachment.original_filename) - body = attachment.read - content_type = AlaveteliFileTypes.filename_and_content_to_mimetype(filename, body) || 'application/octet-stream' + attachment_body = attachment.read + content_type = AlaveteliFileTypes.filename_and_content_to_mimetype(filename, attachment_body) || 'application/octet-stream' attachment_hashes.push( :content_type => content_type, - :body => body, + :body => attachment_body, :filename => filename ) end |