file sharing web app
you can upload, download, delete, etc
sudo pip install tornadopython filehub.py
then it's up and running on localhost:8888
by default FileHub handles file upload/download with tornado itself, for fast-setup consideration
but tornado is not so efficient in serving static files and especially uploading files (limited by RAM or so, people say)
so FileHub comes with nginx support
you can easily switch to nginx:
- install nginx with nginx upload module
- notice: this module doesn't support newest version of nginx, I'm using nginx 1.2.9 and it works fine
- put
nginx.confto/etc/nginx/site-enabled/(may differ for different OS) - change the following fields in
filehub.confon your needs:
rootinlocation ^~ /static/aliasinlocation /download/upload_storeinlocation /upload/(make sure you create it)
- uncomment
static_server = 'nginx'inconfig.py
that's it
files will be uploaded to files/ folder right in FileHub root directory by default
you can change that by modifying files_path in config.py
this may be useful if you want to store files on another disk
- codes and comments cleaning
- more elegant module structure
- auth system
- display corresponding icons for different type of file
- display uploading progress for individual file
- handle uploading errors