FIX: `upload:migrate_to_s3` rake task not remapping properly.

This commit is contained in:
Guo Xiang Tan 2018-10-10 15:08:34 +08:00
parent 6b7bb543af
commit 918633aa12
1 changed files with 3 additions and 0 deletions

View File

@ -257,7 +257,10 @@ def migrate_to_s3
end
# remap the URL
DbHelper.remap(UrlHelper.absolute(from), Discourse.store.cdn_url(to))
DbHelper.remap(UrlHelper.absolute_without_cdn(from), Discourse.store.cdn_url(to))
DbHelper.remap(from, to)
upload.optimized_images.destroy_all
putc "."
end