title: Setting MEDIA_URL for Django Heroku App, Amazon S3
body: <p>I've been attempting to set up a MEDIA_URL for my Heroku app, which is currently serving static files via STATIC_URL from Amazon S3. The static files are working fine, but when I attempt to add a MEDIA_URL in addition to the current STATIC_URL, the pages no longer render at all and the app ceases to work.</p>
  
  <p>The current settings are:</p>
  
  <pre><code>AWS_STORAGE_BUCKET_NAME = 'bucketname'
  STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
  S3_URL = 'http://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME
  STATIC_URL = S3_URL
  AWS_ACCESS_KEY_ID = 'KEY'
  AWS_SECRET_ACCESS_KEY = 'SECRET_KEY'
  </code></pre>
  
  <p>When I add:</p>
  
  <pre><code>MEDIA_URL = S3_URL
  DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
  </code></pre>
  
  <p>that causes the issue. Specifically, the MEDIA_URL is problematic as when DEFAULT_FILE_STORAGE is deleted, it still has the same issue. But I'm trying to determine best how to serve user uploaded media through this unsuccessfully.</p>
  
  <p>If anyone has any insight how best to achieve this, it would be most appreciated.</p>