aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api_controller.rb6
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