Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to mock s3 for development #222

Open
ABODFTW opened this issue Dec 30, 2020 · 4 comments
Open

Add a way to mock s3 for development #222

ABODFTW opened this issue Dec 30, 2020 · 4 comments

Comments

@ABODFTW
Copy link

ABODFTW commented Dec 30, 2020

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
Copy link

eyesee1 commented Apr 13, 2021

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
Copy link
Author

ABODFTW commented Apr 23, 2021

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
Copy link

wodCZ commented Apr 23, 2021

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
Copy link

jaradc commented Sep 22, 2022

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:

  • overriding the form URL field widget during init with a ClearableFileInput (doesn't work because a filefield and urlfield are two different things)
  • adding a null=True models.FileField() to my existing model containing the S3DirectField

Probably more elegant ways. Would love some ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants