Browse Source

fixed gitea文件下载缓存,md5 file

pull/347/head
xxq250 1 year ago
parent
commit
8a14530395
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

@@ -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_data(file, filename: filename, type: "application/octet-stream", disposition: 'attachment')
send_file(file, filename: filename, type: "application/octet-stream", disposition: 'attachment')
end
end



Loading…
Cancel
Save