response = Response(FileWrapper(upstream_response.content), content_type=
    'YOUR_MIME_TYPE')
response['Content-Disposition'
    ] = 'attachment; filename="%s"' % 'your_filename.ext'
return response
Using Django Rest Framework as security layer for file system processing