Fixed the issue of the strip spaces middleware with downloads

This commit is contained in:
Roberto Rosario
2011-03-23 05:30:37 -04:00
parent bc181c703d
commit 1ff7c60ecd
2 changed files with 2 additions and 2 deletions

View File

@@ -557,7 +557,7 @@ def document_download(request, document_id):
try:
#Test permissions and trigger exception
document.open()
return serve_file(request, document.file, save_as='%s' % document.get_fullname())
return serve_file(request, document.file, save_as='%s' % document.get_fullname(), content_type='image/jpeg')
except Exception, e:
messages.error(request, e)
return HttpResponseRedirect(request.META['HTTP_REFERER'])