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 support for dynamically overriding key_args on a form field level #178

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

orzarchi
Copy link

I found that hard coding key_args in the django settings files isn't very useful.
Lots of use cases require dynamic s3 keys.
This solutions allows to override key_args on a form field level, either with a static value or using information from other fields as seen in the new readme example.

@HugoDelval
Copy link

Looks pretty useful 👍

@orzarchi
Copy link
Author

orzarchi commented Sep 24, 2019

It's going to be merged any day now, I'm sure

@lucasvazq
Copy link

Hey guy, can you see this one second?

In this file s3direct/views.py, at line 36 is the follow code:

    allowed = dest.get('allowed')
    if (allowed and file_type not in allowed) and allowed != '*':
        resp = json.dumps({'error': 'Invalid file type (%s).' % file_type})
        return HttpResponseBadRequest(resp, content_type='application/json')

I think the parentheses aren't necessary, I'm in the correct?

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

Successfully merging this pull request may close these issues.

3 participants