diff app/models/paste.rb @ 483:02d043b1967d

Accept file upload instead of binary gzip parameter
author nanaya <me@nanaya.pro>
date Sun, 28 Nov 2021 19:54:08 +0900
parents f11862e58af4
children 84ca55a0568e
line wrap: on
line diff
--- a/app/models/paste.rb	Sun Nov 28 19:45:59 2021 +0900
+++ b/app/models/paste.rb	Sun Nov 28 19:54:08 2021 +0900
@@ -36,7 +36,7 @@
   end
 
   def paste_gzip=(paste)
-    self.paste = ActiveSupport::Gzip.decompress paste
+    self.paste = ActiveSupport::Gzip.decompress paste.read
   end
 
   def paste_gzip_base64=(paste)