fix: download delay

This commit is contained in:
yystopf 2022-01-13 11:24:27 +08:00
parent f9bc2258ec
commit f33b9559cd
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ module RepositoriesHelper
def download_type(str)
default_type = %w(xlsx xls ppt pptx pdf zip 7z rar exe pdb obj idb RData rdata doc docx mpp vsdx dot otf eot ttf woff woff2 mp4 mov wmv flv mpeg avi avchd webm mkv)
default_type.include?(str&.downcase)
default_type.include?(str&.downcase) || str.blank?
end
def image_type?(str)

View File

@ -9,7 +9,7 @@ if @project.forge?
json.type entry['type']
json.size entry['size']
json.content decode64_content(entry, @owner, @repository, @ref, @path)
json.content direct_download ? nil : decode64_content(entry, @owner, @repository, @ref, @path)
json.target entry['target']
download_url =