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.
|
Correct style and search for all Doxygen versions.
|
||||||
Setup:
|
Setup:
|
||||||
Index files: index.html
|
Index files: index.html
|
||||||
Valid extensions: html png gif js css
|
Valid extensions: html png gif js css pdf
|
||||||
Default template: doxygen.
|
Default template: doxygen.
|
||||||
Menu caption: Doxygen
|
Menu caption: Doxygen
|
||||||
|
|
|
@ -56,6 +56,9 @@ class RedmineEmbeddedController < ApplicationController
|
||||||
elsif path.match('\.js$')
|
elsif path.match('\.js$')
|
||||||
raw=File.read(path)
|
raw=File.read(path)
|
||||||
send_data raw, :disposition => 'inline', :type => "text/javascript", :streaming => "true"
|
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
|
else
|
||||||
embed_file path
|
embed_file path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue