Upload / Download Django File in the Social Community

I have a social community built in Django and I want to add a upload / download / read function (documents) for users so that many users can perform these operations at the same time.

What did you recommend to me? Is the standard Django upload / download function suitable for this purpose?

Thanks!

+4
source share
1 answer

No, it’s best to delegate them to a static media server. Usually you just generate an empty response with some headers ("X-Accel-Redirect" on nginx, "XSendFile" on most others) that indicate the file path. This allows Django to be used for logic, but the web server for the service itself.

+5
source

Source: https://habr.com/ru/post/1313684/


All Articles