Reputation: 3233
I am having trouble using django-storages with s3. Everything works using boto (creating and reading back files) so it's not anything to do with credentials.
I have the following keys in settings.py:
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = '...'
AWS_SECRET_ACCESS_KEY = '...'
AWS_STORAGE_BUCKET_NAME = 'sff-dev'
I have the following model:
class Document(models.Model):
title = models.CharField(max_length=100)
document = models.FileField(upload_to='documents')
I'm not sure what I should be using for upload_to, if anything. I've also tried '/'.
I have tried various things such as setting AWS_QUERYSTRING_AUTH = False and AWS_S3_SECURE_URLS = False but nothing works.
Upvotes: 2
Views: 619