Wednesday, June 20, 2018

Re: Django 1.11 Serving Large files for download ??

Hi Julio,

       Thank you for that. You mean to say that we have to leave it web server rather then Django. But the files have to be authenticated based on the request. When a person
requests for a file only his respective file has to be provided for download.

With a bit of googling i checked FileResponse can be used from if it has be handled by Django or We can use Apache2 Xsend-file

Apache2 xsendfile is what you will be suggesting for this. Or does it has be handled in any other way.
On Wednesday, 20 June 2018 18:12:36 UTC+5:30, Julio Biason wrote:
Hi Gokul,

Well, since this is for intranet, you may be lucky.

For large downloads, you can put your facing server (nginx, apache) to point directly to the media directory. For example, if your media files are being stored on `/srv/myserver/media`, and have an URL of `/media`, you could add a location of `/media` pointing directly to the file system (your `/srv/myserver/media`). This way, Django won't get in the way and the whole process of sending a large file will be the facing server problem -- and they are better optimized for this.

The same thing goes for simultaneous requests: usually, the facing server will launch more than one socket to the underlying service to retrieve the information, so you end up with more "Djangos" running. One example is that, if you use uwsgi with nginx, you can set up the number of threads directly on uwsgi and it and nginx will take care of answering multiple requests.

On Wed, Jun 20, 2018 at 12:07 AM, Gokul Swaminathan <goku...@gmail.com> wrote:
How to serve large file for download. Also it should handle simultaneous requests. I have to serve the web application in Intranet environment.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/32ed1909-da16-4254-92e6-35359db576eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101  |  Mobile: +55 51 99907 0554

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/39c51e7d-466d-4b70-b316-8a55883e5148%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment