Upload Module - add response header with MD5

mokriy nginx-forum at nginx.us
Sat Aug 18 10:54:01 UTC 2012

here is the snuppet of configuration I use for uploading:
location /upload {
                auth_request /auth;
                upload_pass /200;
                upload_store /download 1;

                upload_resumable on;

                #Return download path to calling party in custom header
                upload_add_header XXX-DownloadURI "$upload_tmp_path";
                #Return md5 file checksum to calling party as custome header
                upload_add_header X-XXX-MD5SizeChecksum "$upload_file_md5";
                upload_add_header X-XXXXr-FileSize "$upload_file_size";

                upload_aggregate_form_field "$upload_field_name.md5"
                upload_aggregate_form_field "$upload_field_name.size"

It works perfect, great job, thanks! Specially about upload_add_header.
However the MD5 hashes returned in response header are.. not hashes. 
They are:
34383765656261393461336230613362 OR
I can't rely on them on caller side..

Could it be a problem with add_header? I assume that aggregate field is
generated correctly, however when setting it to header via
upload_add_header, there is an convertion mistake.

Many thanks in advance!
You are doing great Job

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,229882,229882#msg-229882

More information about the nginx mailing list