Skip to content

Commit

Permalink
Add content_type to 'Invalid file type' message.
Browse files Browse the repository at this point in the history
  • Loading branch information
celiao committed Sep 7, 2014
1 parent f137aa6 commit 1125d1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions s3direct/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_upload_params(request):
return HttpResponse(data, content_type="application/json", status=403)

if allowed and content_type not in allowed:
data = json.dumps({'error': 'Invalid file type.'})
data = json.dumps({'error': 'Invalid file type (%s).' % content_type})
return HttpResponse(data, content_type="application/json", status=400)

if isfunction(key):
Expand All @@ -44,4 +44,4 @@ def get_upload_params(request):
key = '%s/${filename}' % key

data = create_upload_data(content_type, key)
return HttpResponse(json.dumps(data), content_type="application/json")
return HttpResponse(json.dumps(data), content_type="application/json")

0 comments on commit 1125d1b

Please sign in to comment.