This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This example requires the body-streaming tornado fork at https://github.com/nephics/tornado. | |
Refer to http://groups.google.com/group/python-tornado/browse_thread/thread/791c67cb86c2dea2. | |
Supports uploading an unlimited number/size of files in a single | |
PUT multipart/form-data request. Each file is processed as the stream | |
finds the part in the form data. | |
==USAGE== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest, os, os.path, sys, urllib | |
import tornado.database | |
import tornado.options | |
from tornado.options import options | |
from tornado.testing import AsyncHTTPTestCase | |
# add application root to sys.path | |
APP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | |
sys.path.append(os.path.join(APP_ROOT, '..')) |