Hello all,
im using django-sendfile with django 1.8.4. Tested with development
backend and runserver, everything is fine.
But when going to Apache2 and xsendfile backend, the downloaded files
are empties, i don't understand why.
I have:
MEDIA_ROOT = '/home/devel/media/python3/media'
and Images are in MEDIA_ROOT
In apache2 conf:
<Directory /home/devel/media/python3/media/Images/>
Options Indexes FollowSymLinks MultiViews
XSendFile On
AllowOverride All
Order allow,deny
allow from all
</Directory>
and in views.py, i have:
response = HttpResponse(content_type='application/force-download')
response['Content-Disposition'] = 'attachment;filename="%s"'\
% smart_str(
img.name)
response["X-Sendfile"] = img.image.path
response['Content-length'] = img.image.size
return response
Anybody can help?
Thanks in advance,
--
Gérard Henry