0

I am using Django 1.6.2 and django-imagekit==3.2.1.

I have the following in my model:

class Avatar(models.Model):
avatar = ProcessedImageField(upload_to=/here/the/path,
                             format='JPEG',
                             options={'quality': 60})
avatar_thumb = ImageSpecField(source='avatar',
                               processors=[ResizeToFill(150, 150)],
                               format='JPEG',
                               options={'quality': 60})

On upload my avatar is correctly saved to my S3, but nothing happens with my avatar_thumb.

How can I modify the avatar_thumb (rename it, setting s3 path) and save it also to the S3?

Rikesh
  • 26,156
  • 14
  • 79
  • 87
nuss
  • 1,280
  • 2
  • 9
  • 12

1 Answers1

-1

Checkout django-storages, you can then set your 'upload_to' to a path in an S3 bucket.

Chris Montanaro
  • 16,948
  • 4
  • 20
  • 29