mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
Merge branch 'pre_trustie_server' into trustie_server
This commit is contained in:
@@ -17,14 +17,15 @@ if @project.forge?
|
||||
json.content (direct_download || image_type || is_dir) ? nil : decode64_content(entry, @owner, @repository, @ref, @path)
|
||||
json.target entry['target']
|
||||
|
||||
download_url =
|
||||
if image_type
|
||||
dir_path = [@owner.login, @repository.identifier, "raw/branch", @ref].join('/')
|
||||
is_dir ? "" : render_download_image_url(dir_path, entry['path'], decode64_content(entry, @owner, @repository, @ref))
|
||||
else
|
||||
# entry['download_url']
|
||||
is_dir ? "" : render_download_file_url(@owner, @repository, entry['path'].to_s, @ref)
|
||||
end
|
||||
download_url = is_dir ? "" : render_download_file_url(@owner, @repository, entry['path'].to_s, @ref)
|
||||
# if image_type
|
||||
# # dir_path = [@owner.login, @repository.identifier, "raw/branch", @ref].join('/')
|
||||
# # is_dir ? "" : render_download_image_url(dir_path, entry['path'], decode64_content(entry, @owner, @repository, @ref))
|
||||
# is_dir ? "" : render_gitea_raw_url(entry['download_url'])
|
||||
# else
|
||||
# # entry['download_url']
|
||||
# is_dir ? "" : render_download_file_url(@owner, @repository, entry['path'].to_s, @ref)
|
||||
# end
|
||||
json.download_url download_url
|
||||
|
||||
json.direct_download direct_download
|
||||
|
||||
Reference in New Issue
Block a user