Hello,
Am 31.05.2013 23:50, schrieb Homebrewsky:
I'm trying to setup a very simple HTTP POST file upload server. I'm trying
to POST files via curl, without worrying about forms or responses, etc. I
just want to drop the file in nginx, and have it land.
So far, the file uploads into the upload_store location, but it doesn't move
out. I'm left with a valid file with a hashed filename, in a hashed
directory. I feel like I'm missing something simple and obvious, and have
got a bit crosseyed in the process. Here's my config:
location /data {
upload_pass /returnok;
root /opt/datapush/test;
upload_store /tmp/upload 1;
upload_store_access user:rw group:rw all:rw;
upload_set_form_field $upload_field_name.name
"$upload_file_name";
upload_set_form_field $upload_field_name.content_type
"$upload_content_type";
upload_set_form_field $upload_field_name.path
"$upload_tmp_path";
upload_cleanup 400 404 499 500-505;
access_log /mnt/log/nginx/datapush_access.log main;
error_log /mnt/log/nginx/datapush_error.log debug;
}
location /returnok, there you can/must move the file to the final
destination. Currently there happens nothing, but it keeps in the
temporary directory because return code 200 is not listed in
upload_cleanup...
location /returnok {
return 200;
}
Kind regards,
Alexander
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx