summaryrefslogtreecommitdiff
path: root/app/models/blob.rb
diff options
context:
space:
mode:
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 95d2111a992..1c451a3976f 100644
--- a/app/models/blob.rb
+++ b/app/models/blob.rb
@@ -50,6 +50,10 @@ class Blob < SimpleDelegator
text? && language&.name == 'Jupyter Notebook'
end
+ def sketch?
+ binary? && extname.downcase.delete('.') == 'sketch'
+ end
+
def size_within_svg_limits?
size <= MAXIMUM_SVG_SIZE
end
@@ -69,6 +73,8 @@ class Blob < SimpleDelegator
'image'
elsif ipython_notebook?
'notebook'
+ elsif sketch?
+ 'sketch'
elsif text?
'text'
else