<video> and x-sendfile
Using <object> and <embed> were forbidden for obvious security reasons. Instiki now permits embedding video via the HTML5 <video> element (Ogg/Theora encoded videos only, with .ogg or .ogv extensions). You can even upload videos with [[foo.ogg:video]] Instiki now support x-sendfile. See the Proxying page for configuring Apache (with the x-sendfile module). Lighttpd should work similarly. Update Rails to latest Edge (hopefully converging on RC2!).
This commit is contained in:
parent
133c21b801
commit
8ea8b6a8f7
45 changed files with 872 additions and 751 deletions
|
@ -48,6 +48,9 @@ class ApplicationController < ActionController::Base
|
|||
'.jpg' => 'image/jpeg',
|
||||
'.pdf' => 'application/pdf',
|
||||
'.png' => 'image/png',
|
||||
'.oga' => 'audio/ogg',
|
||||
'.ogg' => 'audio/ogg',
|
||||
'.ogv' => 'video/ogg',
|
||||
'.txt' => 'text/plain',
|
||||
'.tex' => 'text/plain',
|
||||
'.zip' => 'application/zip'
|
||||
|
@ -59,6 +62,8 @@ class ApplicationController < ActionController::Base
|
|||
'image/jpeg' => 'inline',
|
||||
'application/pdf' => 'inline',
|
||||
'image/png' => 'inline',
|
||||
'audio/ogg' => 'inline',
|
||||
'video/ogg' => 'inline',
|
||||
'text/plain' => 'inline',
|
||||
'application/zip' => 'attachment'
|
||||
} unless defined? DISPOSITION
|
||||
|
@ -67,6 +72,7 @@ class ApplicationController < ActionController::Base
|
|||
original_options[:type] ||= (FILE_TYPES[File.extname(file_name)] or 'application/octet-stream')
|
||||
original_options[:disposition] ||= (DISPOSITION[original_options[:type]] or 'attachment')
|
||||
original_options[:stream] ||= false
|
||||
original_options[:x_sendfile] = true if request.env.include?('HTTP_X_SENDFILE_TYPE')
|
||||
original_options
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue