summaryrefslogtreecommitdiff
path: root/app/models/blob.rb
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2017-04-07 23:38:43 -0400
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-10 14:56:43 +0100
commitacea881bb012cce0b59f3d5874a630b16d0caaef (patch)
tree9f474df91c38b4ca4f36b3d2edade6c2e352bc24 /app/models/blob.rb
parentc98add157732004d9a2eaa39770edf84eaca6896 (diff)
downloadgitlab-ce-acea881bb012cce0b59f3d5874a630b16d0caaef.tar.gz
Initial balsamiq support
Diffstat (limited to 'app/models/blob.rb')
-rw-r--r--app/models/blob.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb
index 801d3442803..0c1730f6801 100644
--- a/app/models/blob.rb
+++ b/app/models/blob.rb
@@ -58,6 +58,10 @@ class Blob < SimpleDelegator
binary? && extname.downcase.delete('.') == 'sketch'
end
+ def balsamiq?
+ binary? && extname.downcase.delete('.') == 'bmpr'
+ end
+
def stl?
extname.downcase.delete('.') == 'stl'
end
@@ -87,6 +91,8 @@ class Blob < SimpleDelegator
'sketch'
elsif stl?
'stl'
+ elsif balsamiq?
+ 'bmpr'
elsif text?
'text'
else