Transfer files from laptop to mobile using Python

Sahil Rajput - Nov 6 '18 - - Dev Community

If you think that you need some fancy applications to tranfer files from your laptop/computer to mobile, than you are wrong.
All you need is Python

NOTE: Your laptop and your mobile phone should be on same network

Let's get started

Open your terminal and execute this command.
If you are using Python3:

python -m http.server
Enter fullscreen mode Exit fullscreen mode

If you are using Python2:

python -m SimpleHTTPServer
Enter fullscreen mode Exit fullscreen mode

When you will execute this command it will create a HTTP server on your local machine.
screenshot 2018-11-06 at 4 45 57 pm

Type <IP_Address>:8000 in your mobile browser to access the files in the directory where you ran the above command.


If you don't know your IP than follow this steps:
Go to System Preferences -> Network-> You will see your IP address there


Suppose your IP address is 192.168.0.1 then open mobile browser and type 192.168.0.1:8000 to access the files.
screenshot 2018-11-06 at 5 25 05 pm

. . . . . . . . . . . . . . . . .
Terabox Video Player