media assets: fix tagged filenames option.
Fix the `enable_seo_post_urls` config option not being respected. This option controls whether filenames in image URLs contain the tags. This option requires URLs rewrites in Nginx to work so it's disabled by default.
This commit is contained in:
@@ -67,6 +67,7 @@ class MediaAsset < ApplicationRecord
|
||||
"/images/download-preview.png"
|
||||
else
|
||||
slug = "__#{slug}__" if slug.present?
|
||||
slug = nil if !Danbooru.config.enable_seo_post_urls
|
||||
"/#{variant}/#{md5[0..1]}/#{md5[2..3]}/#{slug}#{file_name}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user