<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>example.php</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -14,15 +14,34 @@ http {
     default_type  application/octet-stream;
 
     server {
-        client_max_body_size 100m;
         listen       80;
-        server_name  localhost;
+        client_max_body_size 100m;
 
+        # Upload form should be submitted to this location
         location /upload {
+            # Pass altered request body to this location
             upload_pass   /test;
-            upload_store /tmp;
+
+            # Store files to this directory
+            # The directory is hashed, subdirectories 0 1 2 3 4 5 6 7 8 9 should exist
+            upload_store /tmp 1;
+            
+            # Allow uploaded files to be read only by user
+            upload_store_access user:r;
+
+            # Set specified fields in request body
+            upload_set_form_field &quot;${upload_field_name}_name&quot; $upload_file_name;
+            upload_set_form_field &quot;${upload_field_name}_content_type&quot; $upload_content_type;
+            upload_set_form_field &quot;${upload_field_name}_path&quot; $upload_tmp_path;
+
+            # Inform backend about hash and size of a file
+            upload_aggregate_form_field &quot;${upload_field_name}_md5&quot; $upload_file_md5;
+            upload_aggregate_form_field &quot;${upload_field_name}_size&quot; $upload_file_size;
+
+            upload_pass_form_field &quot;^submit$|^description$&quot;;
         }
 
+        # Pass altered request body to a backend
         location /test {
             proxy_pass   http://localhost:8080;
         }</diff>
      <filename>nginx.conf</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>index.php</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>36f1afe235c51476dcf043f783c6845c84b8826a</id>
    </parent>
  </parents>
  <author>
    <name>Valery Kholodkov</name>
    <email>valery@grid.net.ru</email>
  </author>
  <url>http://github.com/vkholodkov/nginx-upload-module/commit/383e9eaafb2ff219b677a1af40b1837d0efb5cd7</url>
  <id>383e9eaafb2ff219b677a1af40b1837d0efb5cd7</id>
  <committed-date>2008-08-01T12:49:58-07:00</committed-date>
  <authored-date>2008-08-01T12:49:58-07:00</authored-date>
  <message>Improved example script and configuration</message>
  <tree>d4a3bc8c3fc9321111128739cd7a019da4093b45</tree>
  <committer>
    <name>Valery Kholodkov</name>
    <email>valery@grid.net.ru</email>
  </committer>
</commit>
