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