|
|
|
@ -71,7 +71,7 @@ class AttachmentsController < ApplicationController
|
|
|
|
|
if stale?(:etag => @attachment.digest)
|
|
|
|
|
convered_file = File.join(Rails.root, "files", "convered_office", @attachment.disk_filename + ".html")
|
|
|
|
|
if File.exist?(convered_file)
|
|
|
|
|
render :text => File.open(convered_file).read
|
|
|
|
|
send_file convered_file, :type => 'text/html; charset=utf-8', :disposition => 'inline'
|
|
|
|
|
else
|
|
|
|
|
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
|
|
|
|
|
:type => detect_content_type(@attachment),
|
|
|
|
|