D
D
Dmitry Filatov2016-02-01 11:45:56
Django
Dmitry Filatov, 2016-02-01 11:45:56

Nginx + uWSGI + Django. How to upload files larger than 2MB?

Hello,
The server is running on Ubuntu on DIgitalocean
Problem 1
When uploading photos to the site (via POST method), photos of 2 mb in size are loaded in a minute or so, which is already strange =(
Problem 2
When uploading photos larger than 2 mb, the download is in progress (I see status in chrome at the bottom of the screen), reaches 100% and then nothing happens
.

  • Used the client_max_body_size directive for nginx
  • There are no errors in the ngnix logs
  • There are no errors in uwsgi logs

Advise in which direction to at least dig?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Filatov, 2016-02-01
@i_dozi

The solution was found. I logged everything, everything worked ok. Everything came to view junga. And there I found this code
Actually, this was the problem. Lesson - it is necessary to catch exceptions and process them normally.

U
un1t, 2016-02-01
@un1t

client_max_body_size should be enough.
Does the request reach Dzhanga at all?

S
sim3x, 2016-02-01
@sim3x

Set nginx.org/en/docs/ngx_core_module.html#error_log to warn or notice - so you will understand what's going
on. Perhaps your upload is cut off by timeout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question