Uploads migration to S3 fails

After two months I made it!

Edited the GlobalSetting file and changed the function use_s3? to always return true. It didn’t work in any other way.

Then I edited uploads.rake and commented out this block:

if SiteSetting.Upload.s3_cdn_url.blank?
   puts "Please provide the 'DISCOURSE_S3_CDN_URL' environment variable"
    exit 3
end

The migration still was not happy until I did:
export DISCOURSE_S3_CDN_URL=""
(though I don’t use a CDN).

rake uploads:migrate_to_s3
Migrating uploads to S3 for ‘default’…
Uploading files to S3…

  • Listing local files… => 11473 files
  • Listing S3 files… => 13391 files
  • Syncing files to S3

Yay!