2

I have configured my django app's default file storage to use boto.

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage

I also have a model that stores uploaded images to s3

...
profile_pic = models.ImageField(upload_to=get_upload_path, null=True)
...

However, when I reference this field, it shows up with an S3 url. How do I configure this to return a cloudfront address?

blue_zinc
  • 2,410
  • 4
  • 30
  • 38

1 Answers1

0

Use AWS_S3_CUSTOM_DOMAIN in Djangp Storage there is option to specify CloudFront URL

Hardik Gajjar
  • 1,024
  • 12
  • 27