Fileserver in Python

14 Mar 2010
Posted by admin

IM clients often have the the possibility to send files to your contacts. However, depending on the client you are using, this function can sometimes work pretty bad. For me, this has been particular troublesome when I've sent files over the MSN protocol using "non-standard" clients like Pidgin or Emesene on Linux.

To solve this problem, I have written a small webserver i Python for uploading files directly to my computer. When you want somebody to send you a file you just start the script, type a random password and the program will present you an URL which you can give to your friend. When your friend opens the URL in his internet browser, he finds a submission form where he can send you any file.
Remember to create a folder "files" in the same directory as the script. This is where the uploaded files will be placed.

Warning: Although your friend has to provide the random password to upload a file to your computer, this script has some obvious security problems. If your friend wants to he can for example send you an enormous file which will crash your computer if you don't happen to watch the upload process. Use this script at your own risk!

Download now!