mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
fixed gitea文件下载缓存,md5 tmp_path
This commit is contained in:
@@ -60,7 +60,7 @@ class AttachmentsController < ApplicationController
|
|||||||
value = value.to_i + 1
|
value = value.to_i + 1
|
||||||
Rails.cache.write(cache_key, value, expires_in: 1.day)
|
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(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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user