Advertisement
Guest User

Untitled

a guest
Sep 16th, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. from paste.httpserver import *
  2. from webob import *
  3. from webob.dec import *
  4.  
  5. form = '''
  6. <form method=POST enctype="multipart/form-data" action=/>
  7. <input type=file name=file>
  8. <input type=submit>
  9. '''
  10.  
  11. @wsgify
  12. def test_app(req):
  13. if req.method == 'POST':
  14. file = req.params['file']
  15. return Response("ok")
  16. else:
  17. return Response(form)
  18.  
  19. serve(test_app)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement