diff --git a/README b/README index 536e64e..ac03e6b 100644 --- a/README +++ b/README @@ -2,6 +2,6 @@ Fork of Embedded plugin (http://www.redmine.org/wiki/redmine/PluginEmbedded). Correct style and search for all Doxygen versions. Setup: Index files: index.html -Valid extensions: html png gif js css +Valid extensions: html png gif js css pdf Default template: doxygen. Menu caption: Doxygen diff --git a/app/controllers/redmine_embedded_controller.rb b/app/controllers/redmine_embedded_controller.rb index 737c442..149b131 100644 --- a/app/controllers/redmine_embedded_controller.rb +++ b/app/controllers/redmine_embedded_controller.rb @@ -56,6 +56,9 @@ class RedmineEmbeddedController < ApplicationController elsif path.match('\.js$') raw=File.read(path) send_data raw, :disposition => 'inline', :type => "text/javascript", :streaming => "true" + elsif path.match('\.pdf$') + raw=File.read(path) + send_data raw, :disposition => 'inline', :type => "application/pdf", :streaming => "true" else embed_file path end