A simple script created with Claude that enables to share files between devices in the same network.
Program also gives an option to send only text and there is a preview of this text from sent txt file on the file list.
file_server.py is the actual python script,
Text-To-Web_Local.py is an old version of the program.
---
The server requires HTTP Basic Auth. The password is resolved in the following order (first match wins):
-
Environment variable
FILE_SERVER_PASSWORD=my-secret-password python3 file_server.py
-
Command-line argument
python3 file_server.py 8000 my-secret-password
-
Password file Create a file named
.file_server_passwordin the same directory as the script, containing nothing but the password:echo "my-secret-password" > .file_server_password chmod 600 .file_server_password
-
Auto-generated (default) If none of the above is set, the server generates a random password at startup and prints it to the console.
Note: The username is fixed as
admin. If you use the password file, make sure to add it to.gitignoreand restrict its file permissions, since it's stored in plain text.
You can also run the app without https using this command:
$env:FILE_SERVER_NO_HTTPS="1"; python file_server.py
You must also install:
pip install tkinterdnd2