|
|
|
@@ -131,7 +131,9 @@ class VersionReleasesController < ApplicationController |
|
|
|
version = @repository.version_releases.find_by(tag_name: params["tag_name"]) |
|
|
|
attachment = version.attachments.find_by(filename: params["filename"]) |
|
|
|
tip_exception(404, '您访问的页面不存在或已被删除') if attachment.blank? |
|
|
|
redirect_to "/api/attachments/#{attachment.uuid}" |
|
|
|
send_file(absolute_path(local_path(attachment)), filename: attachment.title, stream: false, type: attachment.content_type.presence || 'application/octet-stream') |
|
|
|
update_downloads(attachment) |
|
|
|
# redirect_to "/api/attachments/#{attachment.uuid}" |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|