Skip to main content

A HTTP Server for upload file.

安装

pip install SimpleUpload

配置文件

使用环境变量指定配置文件的位置:

export SIMPLE_UPLOAD_SETTINGS="{path}/simple_upload.cfg"

配置项

RANDOM_KEY

配置随机字符串,对应着提交的r字段,用于防止非法访问

CLIENT_PREFIX

本地文件路径的前缀

SERVER_PREFIX

服务器文件路径的前缀

运行

可以使用unicorn运行,安装unicorn:

pip install unicorn

启动:

gunicorn -b :8000 http_upload.server:app

上传文件

以HTTPie为例:

http -f POST yldev.lankaifa.com:8000 r={your random string} path={local path} f@{local_path}

Virtual Studio Code

可以结合vscode的插件Run on Save 或者Save and Run达到自动上传的目的

vscode的Save And Run插件的一个配置示例:

"saveAndRun": {
    "commands": [
        {
            "match": "^/home/ubuntu/",
            "cmd": "http -f POST ip:port r=r参数 path=${file} f@${file}"
        }
    ]
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SimpleUpload-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file SimpleUpload-0.1.0.tar.gz.

File metadata

  • Download URL: SimpleUpload-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SimpleUpload-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea0b6a234c3b36c20f57032d66ccb7ef765be39d88e1673865d10ca4fcf677cf
MD5 1bd028d97fe56e34dae4d9699f2b73ac
BLAKE2b-256 ce0c8b9b039a5fef5a2b537f97795ebce39e71fcc8a450ea7b8c588c97470dee

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page