基于 Python
Flask
框架的文件存储管理,包括文件上传、下载、查询、删除
允许上传的文件格式:txt, pdf, png, jpg, jpeg, gif
Python 3.6.5
pip install flask
python flask_upload.py
默认端口号: 8089
- 文件上传
POST
方法:yourHost/upload
fileContent - 删除文件
GET
方法:yourHost/delete
参数:filename: yourFile (表单) - 下载文件
GET
方法:yourHost/download/filename
- 获取服务器上的文件列表
GET
方法:yourHost/getlist