nginx defaults to a one megabyte request body and rejects anything larger with a 413 before PHP is involved, so every PHP upload setting in the world makes no difference.
client_max_body_size 20m;
# and PHP, which has two of its own
# upload_max_filesize = 20M
# post_max_size = 21M # must exceed upload_max_filesize
post_max_size has to be the larger of the two because it covers the whole body including the other form fields and the multipart overhead; setting them equal produces a failure at exactly the boundary that is very hard to reproduce. When nginx rejects the request the browser often shows a connection reset rather than the 413, because nginx closes before reading the whole body — which sends people looking in the wrong log. Checking the nginx error log first for any upload problem saves that detour.