Class: MailDude::AttachmentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- MailDude::AttachmentsController
- Defined in:
- app/controllers/mail_dude/attachments_controller.rb
Constant Summary collapse
- SAFE_INLINE_TYPES =
%w[image/gif image/jpeg image/png image/webp image/svg+xml].freeze
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/mail_dude/attachments_controller.rb', line 7 def show record = MailDude.store.find(params[:message_id] || params[:id]) = AttachmentLocator.new(record).find(params[:attachment_id]) send_data .data, filename: .filename, type: .content_type, disposition: disposition_for() end |