Skip to content

Commit

Permalink
Inline displaying of HTML files
Browse files Browse the repository at this point in the history
  • Loading branch information
picman committed Sep 11, 2024
1 parent 7df0cbc commit c4d3f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/dmsf_files_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def view
send_file pdf_preview, filename: "#{basename}.pdf", type: 'application/pdf', disposition: 'inline'
# Text preview
elsif !api_request? && params[:download].blank? && (@file.size <= Setting.file_max_size_displayed.to_i.kilobyte) &&
(@file.text? || @file.markdown? || @file.textile?)
(@file.text? || @file.markdown? || @file.textile?) && !@file.html?
@content = File.read(@revision.disk_file, mode: 'rb')
render action: 'document'
# Offer the file for download
Expand Down

0 comments on commit c4d3f2a

Please sign in to comment.