Merge branch 'pre_trustie_server' into trustie_server

This commit is contained in:
yystopf 2024-05-16 17:25:23 +08:00
commit 65ad9f6c44
1 changed files with 1 additions and 0 deletions

View File

@ -157,6 +157,7 @@ module RepositoriesHelper
ext = File.extname(s_content)[1..-1]
ext = ext.split("?")[0] if ext.include?("?")
if (image_type?(ext) || download_type(ext)) && !ext.blank?
s_content = s_content.starts_with?("/") ? s_content[1..-1] : s_content[0..-1]
s_content = File.expand_path(s_content, file_path)
s_content = s_content.split("#{Rails.root}/")[1]
# content = content.gsub(s[0], "/#{s_content}")