SHARE
TWEET

Untitled

a guest Sep 16th, 2011 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top