diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-25 18:08:36 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-26 11:22:17 +0300 |
commit | 939436480c8c6bd524d3c4c78674e81f90861d06 (patch) | |
tree | 8b9dd288e6b0ddf31247b535833c23f74f3da2ea /app/models/blob.rb | |
parent | 4bf20d677b2ec3bffae9fe2ca1abbbc0429b6b28 (diff) |
Ensure relative paths for video are rewritten as we do for images
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/blob.rb')
-rw-r--r-- | app/models/blob.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb index 4279ea2ce57..0df2805e448 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -31,6 +31,10 @@ class Blob < SimpleDelegator text? && language && language.name == 'SVG' end + def video? + UploaderHelper::VIDEO_EXT.include?(extname.downcase.delete('.')) + end + def to_partial_path if lfs_pointer? 'download' |