我使用的是Django 1.6.2和django-imagekit==3.2.1。
我的模型中包含以下内容:
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})上传时,我的头像被正确地保存到我的S3,但我的avatar_thumb没有任何反应。
如何修改avatar_thumb (重命名,设置s3 path)并将其保存到S3?
发布于 2014-04-23 23:05:45
签出django-storages,然后可以将'upload_to‘设置为S3存储桶中的路径。
https://stackoverflow.com/questions/23237628
复制相似问题