Joined April 2017
·

rajself

IT Professional at Self
·
Bangalore
·
·

Posted to Nginx direct file upload over 1 year ago

Hi , I am completely new to nginx. My requirement is to upload a file using nginx. I have downloaded nginx zip file on windows and able to see "Welcome to nginx!" message on browser after starting it. nginx.conf file is updated as below

location /upload {
authbasic "Restricted Upload";
auth
basicuserfile basic.htpasswd;
limit_except POST { deny all; }

clientbodytemppath /tmp/;
client
bodyinfileonly on;
client
bodybuffersize 128K;
clientmaxbody_size 1000M;

proxypassrequestheaders on;
proxy
setheader X-FILE $requestbodyfile;
proxy
setbody off;
proxy
redirect off;
proxy_pass http://backend/file;

Now I am not sure on below
1. How will I leverage specific module to use like - clientbodyinfileonly or nginx-upload-module . What steps is required to use these modules.
2. What will be trigger point/source to invoke module. Will it be command based or java code needs to be written. I wanted to trigger this upload using java code.
3. What do I need to do for proxy_pass. Is it required to implement by my own.

Please suggest that I could proceed. None of source is available which describe the step for using it from end to end.

Achievements
1 Karma
0 Total ProTip Views
Interests & Skills