file sharing web app
you can upload, download, delete, etc
sudo pip install tornado
python 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.conf
to/etc/nginx/site-enabled/
(may differ for different OS) - change the following fields in
filehub.conf
on your needs:
root
inlocation ^~ /static/
alias
inlocation /download/
upload_store
inlocation /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
FileHub now comes with a simple auth system, to indentify the uploader and protect users' files
by default a super user account will be generated with the project's initial setup
username: makto
password: toruk
super user could delete any file or folder despite its real owner
you can alter any user into super user with raw SQL in the command line
- codes and comments cleaning
- more elegant module structure
- display corresponding icons for different type of file
- display uploading progress for individual file
- handle uploading errors