# Uploads migration to S3 fails

**URL:** <https://meta.discourse.org/t/uploads-migration-to-s3-fails/106487>\
**Category:** Product Support\
**Created:** [14 בינואר,‏ 2019,‏ 12:31pm UTC](https://meta.discourse.org/t/uploads-migration-to-s3-fails/106487 "2019-01-14T12:31:38Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![vulkanino](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vulkanino/32/119654_2.png) [@vulkanino](https://meta.discourse.org/u/vulkanino)\
**Post date:** [4 במרץ,‏ 2019,‏ 10:06am UTC](https://meta.discourse.org/t/uploads-migration-to-s3-fails/106487/18 "2019-03-04T10:06:55Z")

</div>

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!

---

_[View the full topic](https://meta.discourse.org/t/uploads-migration-to-s3-fails/106487)._
