# Attention Valery Kholodkov :) Upload Module query

**URL:** <https://www.ruby-forum.com/t/attention-valery-kholodkov-upload-module-query/214492>\
**Category:** NGINX\
**Created:** [December 3, 2011, 7:35am UTC](https://www.ruby-forum.com/t/attention-valery-kholodkov-upload-module-query/214492 "2011-12-03T07:35:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [December 3, 2011, 7:35am UTC](https://www.ruby-forum.com/t/attention-valery-kholodkov-upload-module-query/214492/1 "2011-12-03T07:35:31Z")

</div>

Hello Folks and hello Valery,

I want to run the example.php that comes alongwith Valery’s upload  
module. However, I’m having problems trying to set it up correctly.  
(Sorry I have never worked on php before so please please pardon my  
query here, but I wanna make a good progress this weekend for my  
hobbyist project 🙂

So, after compiling nginx code and creating nginx.config, where exactly  
should I put the example.php and upload.html files?

Another side query is, would it matter if I use Apple’s LLVM GCC  
compiler for compiling the nginx code? I have Lion on my Mac (10.7).

Thanks a lot in advance and happy weekend!!

Kind regards,  
~Viren

Posted at Nginx Forum:

> **[Attention Valery Kholodkov :) Upload Module query](https://forum.nginx.org/read.php?2,219528,219528#msg-219528)**
>
> Hello Folks and hello Valery, I want to run the example.php that comes alongwith Valery's upload module. However, I'm having problems trying to set it up correctly. (Sorry I have never worked on php before so please please pardon my query here, but I...

---

<div class="post-metadata">

**Author:** ![drvirens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@drvirens](https://www.ruby-forum.com/u/drvirens)\
**Post date:** [December 3, 2011, 8:28am UTC](https://www.ruby-forum.com/t/attention-valery-kholodkov-upload-module-query/214492/2 "2011-12-03T08:28:00Z")

</div>

On Sat, Dec 03, 2011 at 01:34:52AM -0500, drvirens wrote:

> Another side query is, would it matter if I use Apple’s LLVM GCC  
> compiler for compiling the nginx code? I have Lion on my Mac (10.7).

I’m working with FreeBSD ports tree on FreeBSD9 with clang. I’d like  
to tell that www/nginx and www/nginx-devel compiles well with clang,  
as well as with gcc.

–  
Sergey A. Osokin  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![drvirens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@drvirens](https://www.ruby-forum.com/u/drvirens)\
**Post date:** [December 3, 2011, 1:48pm UTC](https://www.ruby-forum.com/t/attention-valery-kholodkov-upload-module-query/214492/3 "2011-12-03T13:48:20Z")

</div>

Run it on Apache or PHP-FPM behind nginx.

–  
Best regards,  
Valery K.

---

<div class="post-metadata">

**Author:** ![drvirens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dfb087/32.png) [@drvirens](https://www.ruby-forum.com/u/drvirens)\
**Post date:** [December 10, 2011, 8:09am UTC](https://www.ruby-forum.com/t/attention-valery-kholodkov-upload-module-query/214492/4 "2011-12-10T08:09:23Z")

</div>

Thank you Valery and Sergey. I was able to compile nginx on Mac 10.7  
using gcc llvm compiler and also able to use Valery’s module to upload  
files to my nginx server. Now I’m stuck in reading the values sent by  
upload module to backend server, specifically the below fields:

# Set specified fields in request body

```
        upload_set_form_field "${upload_field_name}_name"

```

$upload\_file\_name;  
upload\_set\_form\_field “${upload\_field\_name}\_content\_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}_md5"

```

$upload\_file\_md5;  
upload\_aggregate\_form\_field “${upload\_field\_name}\_size”  
$upload\_file\_size;

I saw that in PHP it is done using \_PHP syntax, but not sure how  
could that be done in CppCMS.

Thanks anyways for your earlier replies.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,219528,219852#msg-219852](http://forum.nginx.org/read.php?2,219528,219852#msg-219852)
