Skip to main content

A file useful simple transfer service app

Project description

简易文件服务器

使用python django 总共三个映射,默认80端口
/postfile/ 上传接口
/upload/ 上传页面接口
/public/ 上传文件列表接口
/还有个主页访问获取当前网卡ip
会在运行目录生成server.log日志

安装

[编译版本]pip install .
[测试版本]pip install -i https://test.pypi.org/simple/ FiletransferApp
[发行版本]pip install FiletransferApp
[不可用]setup.py install[原因:会安装为egg包,Django目前无法识别包文件]

运行

python -m app.filetransfer #默认运行
python -m app.filetransfer -h #帮助

卸载

pip uninstall filereansferapp

windows使用

[上传]浏览器打开http://localhost/upload/
[浏览和下载]浏览器打开http://localhost/public/
其他机器访问localhost换成当前网卡的ip

linux 使用

[上传]curl http://localhost/postfile/ -F "file=@/path" 
[上传]curl localhost/postfile/ -F "file=@/root/demo"
[上传多个]curl localhost/postfile/ -F "file=@filename1" -F "file=@filename2"
[浏览] curl http://localhost/public/
[下载] wget http://localhost/public/filename

path是绝对路径,也可以用当前路径 filename填你要下载的文件名 有一种no files for upload!叫做文件正在写入

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

FiletransferApp-0.0.2b2.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

FiletransferApp-0.0.2b2-py3-none-any.whl (18.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page