From f33e583ca40c05ee570eb43b5adb0237f1bfe344 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 17 Oct 2024 14:26:57 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20gitea=E6=96=87=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E7=BC=93=E5=AD=98,md5=20tmp=5Fpath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 7d5e666af..b4628bff1 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -60,7 +60,7 @@ class AttachmentsController < ApplicationController value = value.to_i + 1 Rails.cache.write(cache_key, value, expires_in: 1.day) # send_data(response.body.force_encoding("UTF-8"), filename: filename, type: "application/octet-stream", disposition: 'attachment') - send_file(file, filename: filename, type: "application/octet-stream", disposition: 'attachment') + send_file(tmp_path, filename: filename, type: "application/octet-stream", disposition: 'attachment') end end