diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/blob.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb index 1c451a3976f..f82126f8e65 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -46,6 +46,10 @@ class Blob < SimpleDelegator text? && language && language.name == 'SVG' end + def pdf? + name && File.extname(name) == '.pdf' + end + def ipython_notebook? text? && language&.name == 'Jupyter Notebook' end @@ -71,6 +75,8 @@ class Blob < SimpleDelegator end elsif image? || svg? 'image' + elsif pdf? + 'pdf' elsif ipython_notebook? 'notebook' elsif sketch? |