Skip to content

upload_pass_form_field does not work #150

Open
@anymale

Description

@anymale

Using this form

<form name="upload" method="POST" enctype="multipart/form-data" action="http://localhost:8009/mptst">
<input type="file" name="file1"><br>
<input type="file" name="file2"><br>
<input type="text" name="txt1">
<input type="submit" name="submit" value="Upload">

I send file(s) with comment but after upload module I do not see anything but file1.* and file2.* fields.

nginx config:

  location @mptst { js_content tst.mptst; }
  location /mptst {
    ### Pass altered request body to this location
    upload_pass         @mptst;

    ### 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;

    ### Allow uploaded files to be read only by user
    upload_store_access user:r;

    ### Set specified fields in request body
    upload_set_form_field       $upload_field_name.name "$upload_file_name";
    upload_set_form_field       $upload_field_name.type "$upload_content_type";
    upload_set_form_field       $upload_field_name.path "$upload_tmp_path";

    ### Inform backend about hash and size of a file
    upload_aggregate_form_field $upload_field_name.sha1 "$upload_file_sha1";
    upload_aggregate_form_field $upload_field_name.size "$upload_file_size";

    upload_pass_form_field      ".*";

    upload_cleanup      400 404 499 500-505;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions