Skip to content

Commit

Permalink
Docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleyg committed Sep 5, 2014
1 parent 66425c6 commit 051dda4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ S3DIRECT_REGION = 'us-east-1'
# 'destination_key' is the key to use for the 'dest' attribute on your widget or model field
S3DIRECT_DESTINATIONS={
# Allow anybody to upload any MIME type
'misc': ('uploads/misc'),
'misc': ('uploads/misc',),

# Allow staff users to upload any MIME type
'files': ('uploads/files', lambda u: u.is_staff),
'files': ('uploads/files', lambda u: u.is_staff,),

# Allow anybody to upload jpeg's and png's.
'imgs': ('uploads/imgs', lambda u: True, ['image/jpeg', 'image/png']),
'imgs': ('uploads/imgs', lambda u: True, ['image/jpeg', 'image/png'],),

# Allow authenticated users to upload mp4's
'vids': ('uploads/vids', lambda u: u.is_authenticated(), ['video/mp4'])
'vids': ('uploads/vids', lambda u: u.is_authenticated(), ['video/mp4'],)

# Allow anybody to upload any MIME type with a custom name function, eg:
'custom_filename': (lambda old_filename: 'images/unique.jpg',),
Expand Down

0 comments on commit 051dda4

Please sign in to comment.