fix bug with files geting uploaded to wrong servers
This commit is contained in:
@@ -100,6 +100,8 @@ class UploadService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.distribute_files(file, record, type)
|
def self.distribute_files(file, record, type)
|
||||||
|
# need to do this for hybrid storage manager
|
||||||
|
record.id = nil
|
||||||
[Danbooru.config.storage_manager, Danbooru.config.backup_storage_manager].each do |sm|
|
[Danbooru.config.storage_manager, Danbooru.config.backup_storage_manager].each do |sm|
|
||||||
sm.store_file(file, record, type)
|
sm.store_file(file, record, type)
|
||||||
end
|
end
|
||||||
@@ -291,8 +293,10 @@ class UploadService
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if Post.where(source: source).exists?
|
CurrentUser.as_system do
|
||||||
return
|
if Post.tag_match("source:#{source}").exists?
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if Upload.where(source: source, status: "completed").exists?
|
if Upload.where(source: source, status: "completed").exists?
|
||||||
|
|||||||
Reference in New Issue
Block a user