You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
281 B
Python
13 lines
281 B
Python
4 years ago
|
from __future__ import absolute_import
|
||
|
|
||
|
from django.http import HttpResponse
|
||
|
|
||
|
from ..utils import _convert_file_to_url
|
||
|
|
||
|
|
||
|
def sendfile(request, filename, **kwargs):
|
||
|
response = HttpResponse()
|
||
|
response['X-Accel-Redirect'] = _convert_file_to_url(filename)
|
||
|
|
||
|
return response
|