A relay server for sharing files via HTTP
Project description
What’s Filehub?
What do you do if you want to quickly share a file in your local network? You may want to:
Set up a file server, such as an FTP server, or
Install point-to-point file transfer software, such as IP Messenger, on all the machines you want to share files.
The first way needs you to wait for the shared file to be completely uploaded before you can start downloading, if the file was not on the file server already. And it also needs vast caching space on the file server.
The second way needs you to install the software on all the machines. It’s cumbersome indeed. And what if there’s an incompatible platform that you cannot install the software on?
Filehub solves all these problems. If you want to share a file quickly, Filehub is the choice.
Filehub is actually an HTTP server that accepts file uploading via POST methods. But it’s different from a regular file server in that it relays the uploaded data directly to the downloader. This means that you don’t need to wait for the upload to be completed before downloading.
Usage
Install Filehub:
pip install filehub
Start it on your local server:
filehub
Filehub listens on <all interfaces>:8000 by default. Now you can use any HTTP client to access Filehub’s interface. For example, uploading a file using curl:
curl --form f=@FILENAME http://ip.addr.for.filehub:8000/hub
Or you can also use Filehub’s bundled HTML5 client at http://ip.addr.for.filehub:8000 . It has a nicer look, and supports drag & drop operations.
The files being uploaded will be shown in the bottom part of the HTML5 page. Simply clicking the file name will start downloading.
Advantages
HTTP protocol is quite popular. Most machines and smart devices already have a client installed, you don’t need other stuff.
Filehub does not cache any data at all, so it can be run on devices with limited resources, such as a Raspberry Pi or an NAS box, as long as you have Python installed on them.
Filehub streams the shared files on-the-fly, so you don’t need to wait for the files to be uploaded first. This makes it extremely suitable for one-shot sharing of large files.
License
Filehub is licensed under the terms of the MIT license. See LICENSE.txt.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file filehub-0.1.4.tar.gz
.
File metadata
- Download URL: filehub-0.1.4.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6151e054a7776cea60646d88b94133d159799946a84e2c1fb39f06fb18bb5a01 |
|
MD5 | 34df042f1dda1f19640bcdb991e255c5 |
|
BLAKE2b-256 | ddda62b6db9c442e65c1043d0fd77ddabb11cae73dca4f22d394743901649b52 |