nginx-upload-module is really a good module which saves uploaded files to local temp directory with nginx itself and sends related information to backends.
But its official repository seems died many years ago, and that makes it incompatible with latest nginx. Fortunately, there is a forked repository [https://github.com/Austinb/nginx-upload-module] can be used.
But if you are using
Ubuntu 16.04, additionally, you need to manually change compile flags to avoid some errors such as
undefined reference to 'MD5_Update':
./configure [configure flag], you need to