paperclip_database_storage 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,6 @@ class PaperclipDatabaseStorage::AttachmentsController < ApplicationController
|
|
14
14
|
raise ActionController::RoutingError.new('Too many images found. Check your route definition') if attachments.length > 1
|
15
15
|
|
16
16
|
attachment = attachments.first
|
17
|
-
send_data attachment.file_data, :type => attachment.content_type
|
17
|
+
send_data attachment.file_data, :type => attachment.content_type, :disposition => attachment.content_type.strip =~ /^image/ ? 'inline' : 'attachment'
|
18
18
|
end
|
19
19
|
end
|
data/config/routes.rb
CHANGED