diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index ab39072..22a5539 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -50,7 +50,7 @@ def show } format.any { path = @document.file.path(params[:style] || params[:format]) - head(:not_found) and return unless File.exist?(path) + head(:not_found) and return unless (File.exist?(path) and request.format.nil? == false) send_file path, :filename => @document.file_file_name, :disposition => "inline",