Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分享一个短链项目,本身有个操作页面 #1

Open
crazypeace opened this issue Mar 16, 2024 · 1 comment
Open

分享一个短链项目,本身有个操作页面 #1

crazypeace opened this issue Mar 16, 2024 · 1 comment

Comments

@crazypeace
Copy link

crazypeace commented Mar 16, 2024

示例:
https://pastebin.icdyct.cloudns.asia/3648000byte

操作页面:
https://pastebin.icdyct.cloudns.asia/tieludasiliqiuweiyue

项目:
https://github.com/crazypeace/url-Shorten-Worker/

@crazypeace
Copy link
Author

linux 命令行操作

假设,
你要上传的文件名 bigdan.yaml
你的短链系统 URL https://pastebin.crazypeace.workers.dev/
你的短链系统的密码 tieludasiliqiuweiyue

那么,

file_content_escaped=$(cat bigdan.yaml | jq -s -R)

cat <<EOF >json_data
{
  "cmd": "add",
  "key": "bigdan.yaml",
  "password": "tieludasiliqiuweiyue",
  "url": $file_content_escaped
}
EOF

curl -H "Content-Type: application/json" -X POST -d @json_data https://pastebin.crazypeace.workers.dev/

图文说明 https://zelikk.blogspot.com/2024/03/linux-curl-post-api.html
视频 https://www.youtube.com/watch?v=-gx9CV_jzVc

项目 https://github.com/crazypeace/url-Shorten-Worker/
项目搭建指南 https://zelikk.blogspot.com/2022/07/url-shorten-worker-hide-tutorial.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant