Added message for successful uploading

This commit is contained in:
Sebastian Lohff 2012-05-04 13:26:25 +02:00
parent c985509141
commit 4d22c6e1dd
1 changed files with 2 additions and 1 deletions

View File

@ -253,7 +253,8 @@ class FilePutter(BaseHTTPServer.BaseHTTPRequestHandler):
target = open(destFileName, "w") target = open(destFileName, "w")
target.write(fstorage["file"].file.read(length)) target.write(fstorage["file"].file.read(length))
target.close() target.close()
self.sendResponse(200, "OK!") self.sendResponse(200, "OK! Thanks for uploading")
print "Received file '%s' from %s." % (destFileName, self.client_address[0])
def do_PUT(self, fromPost=False): def do_PUT(self, fromPost=False):
""" Upload a file via PUT """ Upload a file via PUT