将本地文件上传至 filebin.net 以便快速分享,适用于用户请求上传文件、通过链接分享文件、托管文件或说“上传到 filebin”。
Upload local files to filebin.net so the user gets a shareable link.
text
import uuid
u = uuid.uuid4().hex # hex string (32 chars)
bin_id = f"my-upload{u[-6:]}"
print(bin_id)
Upload via curl (PowerShell): text
curl -si -X POST -H "Content-Type: application/octet-stream" -T "<FILEPATH>" "https://filebin.net/$binId/<FILENAME>"
Extract the URL from the response JSON. Construct:
https://filebin.net/<binId>/<filename>https://filebin.net/<binId>400 "the bin is too short/long", adjust bin ID length and retry.