Source

django-filetransfers / filetransfers / backends / url.py

Full commit
1
2
3
4
5
from django.http import HttpResponseRedirect
from django.utils.encoding import smart_str

def serve_file(request, file, save_as, content_type):
    return HttpResponseRedirect(smart_str(file.url))