# AJAX Uploader with Nginx, Not Catching Files

**URL:** <https://www.ruby-forum.com/t/ajax-uploader-with-nginx-not-catching-files/219874>\
**Category:** NGINX\
**Created:** [May 20, 2012, 1:40am UTC](https://www.ruby-forum.com/t/ajax-uploader-with-nginx-not-catching-files/219874 "2012-05-20T01:40:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 20, 2012, 1:40am UTC](https://www.ruby-forum.com/t/ajax-uploader-with-nginx-not-catching-files/219874/1 "2012-05-20T01:40:23Z")

</div>

Has anyone set up nginx to work with an AJAX uploader like this one  
before? [http://valums.com/ajax-upload/](http://valums.com/ajax-upload/)

Passing the upload through to my Tornado server works fine, but I want  
nginx to handle the file before it gets that far. I have nginx set up  
to intercept regular file posts from our pre-AJAX page with  
“upload\_pass” and “upload\_store,” but now with the file in the body of  
an XHR request, nginx doesn’t treat it as a file for things like  
“upload\_store.”

Also, my AJAX page gets back a 415 error when trying to send the file.  
I’m using the script for image uploads if that makes a difference.

I was thinking I might be able to save a log of the request as the image  
file, but that seems like too much of a hack.

Any help appreciated,  
Zach

Posted at Nginx Forum:

> **[AJAX Uploader with Nginx, Not Catching Files](https://forum.nginx.org/read.php?2,226657,226657#msg-226657)**
>
> Has anyone set up nginx to work with an AJAX uploader like this one before? http://valums.com/ajax-upload/ Passing the upload through to my Tornado server works fine, but I want nginx to handle the file before it gets that far. I have nginx set up to...
