Nginx simple PUT file

I have set the following configuration:

 location /upl {
       root /storage/www/upl/data;
       client_body_temp_path   /storage/www/upl/client_tmp;

       dav_methods  PUT DELETE MKCOL COPY MOVE;

       create_full_put_path   on;
       dav_access             group:rw  all:r;
  }

I upload a file with: curl -T test.txt http://x.xx.xx.xx:8080/upl

All of my files end up in data folder but all files have the same name "upl" the same as the location ?! Why :S

Please help

BR,


You can do this by specifying filename into URL, without using any external module :

location ~ "/upl/([0-9a-zA-Z-.]*)$" {
        alias     /storage/www/upl/$1;
        client_body_temp_path  /tmp/upl_tmp;
        dav_methods  PUT DELETE MKCOL COPY MOVE;
        create_full_put_path   on;
        dav_access             group:rw  all:r;
}

And use : curl -T test.txt http://x.xx.xx.xx:8080/upl/text.txt