Welcome! Log In Create A New Profile

Advanced

Re: Upload Module - add response header with MD5

Valery Kholodkov
August 21, 2012 04:40AM
Aggregate variables cannot be used in upload_add_header directive, because they are not valid outside of a request body part.

----- mokriy <nginx-forum@nginx.us> wrote:
> 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

--
Regards,
Valery Kholodkov

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
SubjectAuthorPosted

Upload Module - add response header with MD5

mokriyAugust 18, 2012 06:54AM

Re: Upload Module - add response header with MD5

Francis DalyAugust 18, 2012 07:38PM

Re: Upload Module - add response header with MD5

mokriyAugust 20, 2012 03:28AM

Re: Upload Module - add response header with MD5

Francis DalyAugust 20, 2012 03:20PM

Re: Upload Module - add response header with MD5

mokriyAugust 21, 2012 03:52AM

Re: Upload Module - add response header with MD5

Valery KholodkovAugust 21, 2012 04:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
Record Number of Users: 5 on May 22, 2013
Record Number of Guests: 226 on June 13, 2013
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready