Skip to content

Instantly share code, notes, and snippets.

@nipunbatra
Last active December 18, 2015 04:49
Show Gist options
  • Save nipunbatra/5728641 to your computer and use it in GitHub Desktop.
Save nipunbatra/5728641 to your computer and use it in GitHub Desktop.
import web
import numpy as np
import time
urls = ("/*", "hello",
"/upload","upload"
)
app = web.application(urls, globals())
class upload:
def POST(self):
data = web.data()
now_time=str(int(time.time()*1000000))+".txt"
f=open(now_time,'w')
f.write(data)
f.close()
return "It worked!!!!"
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment