Skip to content

Commit

Permalink
removing special mimetype handling
Browse files Browse the repository at this point in the history
  • Loading branch information
evsasse committed Dec 13, 2024
1 parent 1177e10 commit 12289cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ def bundled_html
# https://stackoverflow.com/questions/9233021/returning-files-from-rails
# https://apidock.com/rails/ActionController/DataStreaming/send_data
# type = "text/css" if lookup_path.end_with?(".css")
type = Marcel::MimeType.for(extracted_file)
type = nil if lookup_path.end_with?(".css")
# type = Marcel::MimeType.for(extracted_file)
# type = nil if lookup_path.end_with?(".css")
# type = Marcel::MimeType.for(lookup_path) if type == "text/plain"

send_data(
extracted_file,
disposition: "inline",
filename: lookup_path.split("/").last,
**(type.present? ? { type: } : {}),
# **(type.present? ? { type: } : {}),
)
end

Expand Down

0 comments on commit 12289cc

Please sign in to comment.