Upload Module - add response header with MD5

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


Hi!
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
value
                upload_add_header XXX-DownloadURI "$upload_tmp_path";
                #Return md5 file checksum to calling party as custome header
value
                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_file_md5";
                upload_aggregate_form_field "$upload_field_name.size"
"$upload_file_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
34396436323764343839623564646664
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