about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-02-06 21:36:38 +0100
committerThibaut Girka <thib@sitedethib.com>2020-02-06 21:36:38 +0100
commit1a54b9b99e85e9d6b3c52bfe654659019960eb24 (patch)
tree33fe0d6c546dade46cf7842959feff686db4f909 /app/models
parentccaefd139d33f2f0bf4d097131bcf91960bee956 (diff)
parentaeb6efbb03cd98c0425d094677fc748e0c36c240 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/remotable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/remotable.rb b/app/models/concerns/remotable.rb
index b7a476c87..c728a460e 100644
--- a/app/models/concerns/remotable.rb
+++ b/app/models/concerns/remotable.rb
@@ -36,8 +36,8 @@ module Remotable
 
             basename = SecureRandom.hex(8)
 
-            send("#{attachment_name}=", StringIO.new(response.body_with_limit(limit)))
             send("#{attachment_name}_file_name=", basename + extname)
+            send("#{attachment_name}=", StringIO.new(response.body_with_limit(limit)))
 
             self[attribute_name] = url if has_attribute?(attribute_name)
           end