mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
FIX 解决私有版本库库不能访问、下载图片的问题
This commit is contained in:
@@ -11,7 +11,16 @@ if @project.forge?
|
||||
|
||||
json.content decode64_content(entry, @owner, @repository, @ref)
|
||||
json.target entry['target']
|
||||
json.download_url entry['download_url']
|
||||
|
||||
download_url =
|
||||
if image_type
|
||||
dir_path = [@owner.login, @repository.identifier, "raw/branch", @ref].join('/')
|
||||
render_download_image_url(dir_path, entry['path'], decode64_content(entry, @owner, @repository, @ref))
|
||||
else
|
||||
entry['download_url']
|
||||
end
|
||||
json.download_url download_url
|
||||
|
||||
json.direct_download direct_download
|
||||
json.image_type image_type
|
||||
json.is_readme_file is_readme?(entry['type'], entry['name'])
|
||||
|
||||
Reference in New Issue
Block a user