If no content type is set for attachment, use application/octet-stream as fallback.

This commit is contained in:
Martin Edenhofer 2018-02-08 06:33:23 +01:00
parent 0f539febdd
commit 3328641834

View file

@ -253,7 +253,7 @@ class TicketArticlesController < ApplicationController
send_data(
file.content,
filename: file.filename,
type: file.preferences['Content-Type'] || file.preferences['Mime-Type'],
type: file.preferences['Content-Type'] || file.preferences['Mime-Type'] || 'application/octet-stream',
disposition: disposition
)
end