Allow PDF downloading.
This commit is contained in:
parent
be1412e183
commit
709c59547e
2
README
2
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue