-
-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
Hi!
I'm trying to download PDF files from the django runserver development server, "python manager.py runserver", inside a django-unicorn application, but I can't download them. Follow the code >
with open(os.path.join("c:/mydirectory/tmp", filename + '.pdf'), 'rb') as f:
data = f.read()
response = HttpResponse(data, content_type='application/pdf')
response['Content-Disposition'] = 'attachment; filename="' + filename + '.pdf"'
return response
No error occurs, but accessing from another machine I can't download.
Is there any way to be reproduced?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels