From 670f05c65857ba770f79ee9371be29aab5e6e0c9 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 17 Oct 2024 11:58:53 +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,=E6=9B=B4=E6=94=B9=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= 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 30de26915..a668a0691 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -39,7 +39,7 @@ class AttachmentsController < ApplicationController value = Rails.cache.read(cache_key) if value.to_i >= 5 && File.exist?(tmp_path) filepath, ref = url.split("/")[-1].split("?") - send_data(tmp_path, filename: filepath, type: "application/octet-stream", disposition: 'attachment') + send_data(tmp_path, filename: filepath, stream:false, type: 'application/octet-stream') else if url.starts_with?(base_url) && !url.starts_with?("#{base_url}/repo") domain = GiteaService.gitea_config[:domain]