Browse Source

fixed gitea文件下载缓存,更改目录

pull/347/head
xxq250 1 year ago
parent
commit
bffecfc0e4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/attachments_controller.rb

+ 1
- 1
app/controllers/attachments_controller.rb View File

@@ -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, stream:false, type: 'application/octet-stream')
send_file(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]


Loading…
Cancel
Save