Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from paste.httpserver import *
- from webob import *
- from webob.dec import *
- form = '''
- <form method=POST action=/>
- <input type=file name=file>
- <input type=submit>
- '''
- @wsgify
- def test_app(req):
- if req.method == 'POST':
- file = req.params['file']
- return Response("ok")
- else:
- return Response(form)
- serve(test_app)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement