Skip to content

Commit 98f75c8

Browse files
committedJul 25, 2008
Added calculation of MD5 and SHA1 checksums of uploaded files
1 parent 01bb9ec commit 98f75c8

File tree

5 files changed

+379
-83
lines changed

5 files changed

+379
-83
lines changed
 

Diff for: ‎Changelog

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11

2+
Version 2.0.4
3+
* Fixed bug: location configuration of upload_set_form_field and upload_pass_form_field
4+
was not inheritable from server configuration.
5+
* Added feature: directive upload_aggregate_form_field to pass aggragate properties
6+
of a file like file size, MD5 and SHA1 sums to backend. MD5 and SHA1 sums are calculated
7+
on request for file content. When no calculation is requested, additional memory
8+
and CPU are not used. Calculation could be requested via specifying variables
9+
$upload_file_md5, $upload_file_md5_uc, $upload_file_sha1 and $upload_file_sha1_uc.
10+
211
Version 2.0.3
312
* upload_store directive was not able to receive more than one argument.
413
As a result no hashed dirs for file uploads were possible.

Diff for: ‎LICENCE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* Copyright (c) 2008, Valery Kholodkov
1+
* Copyright (c) 2006, 2008, Valery Kholodkov
22
* All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without

Diff for: ‎config

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
USE_MD5=YES
2+
USE_SHA1=YES
13
ngx_addon_name=ngx_http_upload_module
24
HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module"
35
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c"

Diff for: ‎ngx_http_upload_module.c

+360-80
Large diffs are not rendered by default.

Diff for: ‎upload.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
<title>Test upload</title>
44
</head>
55
<body>
6-
<h2>Select file to upload</h2>
7-
<form name="upload" method="POST" enctype="multipart/form-data" action="http://localhost/upload">
6+
<h2>Select files to upload</h2>
7+
<form enctype="multipart/form-data" action="http://localhost/upload" method="post">
88
<input type="file" name="file1"><br>
9+
<input type="file" name="file2"><br>
10+
<input type="file" name="file3"><br>
11+
<input type="file" name="file4"><br>
12+
<input type="file" name="file5"><br>
13+
<input type="file" name="file6"><br>
914
<input type="submit" name="submit" value="Upload">
1015
<input type="hidden" name="test" value="value">
1116
</form>

0 commit comments

Comments
 (0)
Please sign in to comment.