django-s3direct icon indicating copy to clipboard operation
django-s3direct copied to clipboard

Add support for dynamically overriding key_args on a form field level

Open orzarchi opened this issue 5 years ago • 3 comments

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.

orzarchi avatar Mar 21 '19 09:03 orzarchi

Looks pretty useful :+1:

HugoDelval avatar Sep 24 '19 08:09 HugoDelval

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

orzarchi avatar Sep 24 '19 08:09 orzarchi

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?

lucasvazq avatar Dec 04 '19 02:12 lucasvazq