Simple Http Server support uploading files from Windows in Ubuntu

This post was written by admin on May 17, 2010
Posted Under: Internet

Ubuntu user can easily share a temporary file/folder to others by running SimpleHTTPServer script with python.

Just navigate to the directory you want to share in terminal and run:

python -m SimpleHTTPServer

then users in the same LAN can get this directory by typing this in browser:

http://http_server_IP_here:8000

However,this doesn’t support uploading files and what if you want a file comes from a Windows user.
Here is a script written by bones7456 that create a simple http server for others uploading files from Windows as well as downloading on the same network.

Create and edit a new file “SimpleHTTPServerWithUpload.py” (without quotes),then copy and paste following code as its content:

the code’s here

Now,navigate to the folder that you want to share and provide uploading to others,and just run this script with python (assuming the python script saved in ~/Downloads folder).

python ~/Downloads/SimpleHTTPServerWithupload.py

In following picture,My home folder provides uploading as well as downloading service:

Note:For security,just use this in a temporary task.

Related posts:

  1. Windows 7 auto-change background wallpaper functionality in Ubuntu Desktop
  2. Dropbox usage made easy to sync files anywhere within Nautilus
  3. Easy file receiving from friends on the internet with Droopy
  4. Instant LAN File Sharing with one command in Ubuntu
  5. MobaXterm – enhanced terminal X server and Unix commands for Windows

    Reader Comments

    pasting python code doesnt really work too well. Where are the indents? And so ya know … the quotes using in wordpress or whatever CMS this is are very odd and don’t like being copied. So … any change you could get this working then link people to the .py file?

    [Reply]

    #1 
    Written By Anthony on September 18th, 2010 @ 9:19 am

    Very usefull for internal network use.

    thanks.

    [Reply]

    #2 
    Written By glaudiston on October 1st, 2010 @ 12:57 pm

    Trackbacks

    1. Quora  on March 3rd, 2011 @ 7:07 pm

    Add a Comment

    required, use real name
    required, will not be published
    optional, your blog address