mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 23:11:03 +08:00
FIX: don't include multisite upload path to source URL if already exist.
This commit is contained in:
@ -71,7 +71,9 @@ class S3Helper
|
|||||||
if !Rails.configuration.multisite
|
if !Rails.configuration.multisite
|
||||||
options[:copy_source] = File.join(@s3_bucket_name, source)
|
options[:copy_source] = File.join(@s3_bucket_name, source)
|
||||||
else
|
else
|
||||||
if @s3_bucket_folder_path
|
if source.include?(multisite_upload_path) || source.include?(@tombstone_prefix)
|
||||||
|
options[:copy_source] = File.join(@s3_bucket_name, source)
|
||||||
|
elsif @s3_bucket_folder_path
|
||||||
folder, filename = begin
|
folder, filename = begin
|
||||||
source.split("/".freeze, 2)
|
source.split("/".freeze, 2)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user