about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-06-07 03:49:39 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-06-06 20:49:39 +0200
commitb7b331ad0dd061b55435265009af51cdeef29fdc (patch)
tree95e6efc5d957c4de8b47e9b539fdf835ca52c8b7 /app/models
parent12fa2500c4eacb2a5266d2a4a489c97ef499797d (diff)
Add missing dot for remote image (#7751)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/remotable.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/concerns/remotable.rb b/app/models/concerns/remotable.rb
index dc2e12b67..90c6894e0 100644
--- a/app/models/concerns/remotable.rb
+++ b/app/models/concerns/remotable.rb
@@ -69,7 +69,11 @@ module Remotable
 
     return if type.nil?
 
-    type.extensions.first
+    extname = type.extensions.first
+
+    return if extname.nil?
+
+    ".#{extname}"
   end
 
   def parse_content_type(content_type)