django-s3-storage icon indicating copy to clipboard operation
django-s3-storage copied to clipboard

Storage location folder

Open CBinyenya opened this issue 5 years ago • 1 comments

Is there a way I can specify the storage folder or maybe easily override some of the settings with distinct classes

class ProfilePicStorage(S3Storage):
    bucket = 'bucket'
    path = 'media/profiles/'

CBinyenya avatar Jan 06 '20 12:01 CBinyenya

You can use the AWS_S3_KEY_PREFIX setting to apply a prefix to all uploaded files.

You can also set a prefix for individual file fields by setting upload_to="something" on the file field.

On Mon, 6 Jan 2020 at 12:43, Caleb Binyenya [email protected] wrote:

Is there a way I can specify the storage folder or maybe easily override some of the settings with distinct classes

class ProfilePicStorage(S3Storage): bucket = 'bucket' path = 'media/profiles/'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/etianen/django-s3-storage/issues/105?email_source=notifications&email_token=AABEKCE7EZVP3E46VF2YBULQ4MRQTA5CNFSM4KDD3ZE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IEG3DCQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEKCHZPKP6E2PRUHIV2YLQ4MRQTANCNFSM4KDD3ZEQ .

etianen avatar Jan 07 '20 11:01 etianen