#linking s3 objects to django models

5 messages · Page 1 of 1 (latest)

abstract flame
#

I am planning to have profile pictures for users and I'm using s3 to store the images. I am wondering about the best way to link the s3 object to a user model. I was thinking about returning a url and then saving it to the user model.

fleet wasp
#

Here are some pointers to get you started:

  • Have a look at the ImageField for models.
  • You can also configure your MEDIA settings to use S3 as a STORAGE option.
  • The package django-storages should help with this.
abstract flame
#

s3 signed urls for POST and cloudfront for GET

fleet wasp
#

Yes I believe it can as it uses boto under the hood. Take the time to read the docs carefully and even experiment with it before rolling your own thing