fdintino / nginx-upload-module

A module for nginx web server for handling file uploads using multipart/form-data encoding (RFC 1867).
http://www.grid.net.ru/nginx/upload.en.html
Other
987 stars 390 forks source link

Upload module only on specific http verbs #34

Open mvrhov opened 12 years ago

mvrhov commented 12 years ago

Would it be possible, that the upload module would respond only to certain http verbs like PUT, POST and pass the data on unsupported verbs to a custom backend.

Our API is RESTfull, and because of that we'd like to have the same uri for download/upload, but with different http verb. We looked at the code a bit and it seems that its not possible to do so because upload module is registered as content handler. Adding try_files into the same section doesn't work because try_files takes precedence.

wxianfeng commented 12 years ago

hi i do like this: if ($request_method != GET ) { proxy_pass http://unicorn_server; }