1
0
mirror of https://github.com/etesync/server synced 2024-12-01 21:18:09 +00:00
etesync-server/django_etebase/sendfile/backends/nginx.py

13 lines
281 B
Python

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