Asynchronously upload a file using ajaxupload to a tornado web server

I use this javascript library (http://valums.com/ajax-upload/) to upload a file to a tornado web server, but I do not know how to get the contents of the file. The javascript library is loaded using XHR, so I assume I need to read the source data to get the contents of the file. But I do not know how to do this with a tornado. Their documentation does not help, as usual :(

In php they have something like this:

$input = fopen("php://input", "r");

But what is equivalence in a tornado?

+3
source share
1 answer

I got an answer.

I need to use self.request.body to get the source data.

_xsrf, 403.

.

+2

All Articles