Embed video into wiki #1164
This commit is contained in:
parent
1bd6faa846
commit
8d9201fc86
@ -465,7 +465,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def disposition
|
||||
(image? || pdf?) ? 'inline' : 'attachment'
|
||||
(image? || pdf? || video?) ? 'inline' : 'attachment'
|
||||
end
|
||||
|
||||
def preview(limit)
|
||||
|
||||
@ -186,9 +186,15 @@ class DmsfFileTest < RedmineDmsf::Test::UnitTest
|
||||
end
|
||||
|
||||
def test_disposition
|
||||
# Text
|
||||
assert_equal 'attachment', @file1.disposition
|
||||
# Image
|
||||
assert_equal 'inline', @file7.disposition
|
||||
# PDF
|
||||
assert_equal 'inline', @file8.disposition
|
||||
# Video
|
||||
@file1.last_revision.disk_filename = 'test.mp4'
|
||||
assert_equal 'inline', @file1.disposition
|
||||
end
|
||||
|
||||
def test_image
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user