bradleyg / django-s3direct

Directly upload files to S3 compatible services with Django.
MIT License
653 stars 234 forks source link

Add a way to mock s3 for development #222

Open ABODFTW opened 3 years ago

ABODFTW commented 3 years ago

For people using this tool and developing it, I think it would make life easier if there is a documented way on how to mock s3, so there is no need for an AWS S3 account.

I.e

I'm not sure where to start, so if I can get some guidance, I would like to contribute

eyesee1 commented 3 years ago

Probably the quickest way to get what you want is the docker image for Localstack. It's not quite a mock, but it implements s3 and other AWS services locally without making a mess.

ABODFTW commented 3 years ago

Oh thanks for the comment, I've settled with s3erver which is an npm package, and its been great so far.

But I think it would be good if we documented options, not everyone have access to s3 bucket.

If you think it's a good idea, let me know and I will send a pr

wodCZ commented 3 years ago

Not sure about Localstack or s3erver, I'll just add minio as a relatively small (64mb docker image) s3-compatible server. Worked fine with django-storages for local development.

jaradc commented 1 year ago

I too would like to +1 for a way to - or ideas how to - implement "mock" upload to S3 functionality. In my case, I want a FileField during local development, and an S3DirectField in all other environments. Things I thought about / tried:

Probably more elegant ways. Would love some ideas.