ptpb/pb / rspb 兼容的 pastebin,跑在 Cloudflare Workers + R2 上。
Create a new paste from the output of cmd:
cmd | curl -F c=@- https://pb.zhuoran.io/
> echo hi | curl -F c=@- https://pb.zhuoran.io/
date: 2021-01-16 03:26:09.614299435 UTC
digest: 0b8b60248fad7ac6dfac221b7e01a8b91c772421a15b387dd1fb2d6a94aee438
short: e74l
size: 3
url: https://pb.zhuoran.io/e74l
status: created
uuid: 7535e567-173f-4ba0-98ce-71cdd8f02d69
> curl -X PUT -F c=@- https://pb.zhuoran.io/7535e567-173f-4ba0-98ce-71cdd8f02d69 < config.yaml
https://pb.zhuoran.io/e74l updated
Append '.pdf' to hint at browsers that they should probably display a pdf document:
https://pb.zhuoran.io/ullp.pdf
> curl -X DELETE https://pb.zhuoran.io/7535e567-173f-4ba0-98ce-71cdd8f02d69
deleted 7535e567-173f-4ba0-98ce-71cdd8f02d69
> echo http://google.com | curl -F c=@- https://pb.zhuoran.io/u
date: 2021-01-16 03:29:13.865511999 UTC
digest: a1adc32c271516bfb33069304087db349649146f24744b4028d2f975697fd707
short: 1unf
size: 11
url: https://pb.zhuoran.io/1unf
status: created
uuid: b87dcc37-a4c2-4d18-a3a3-c2d875912cde
add '.rs' to the url to highlight rust source
https://pb.zhuoran.io/1e6d.rs
> echo nin | curl -F c=@- https://pb.zhuoran.io/mom
date: 2021-01-16 03:34:22.359830934 UTC
digest: e2f55e5ed88dee2a50c9bb255ad87657e7f173e2560e27ceec8b206e2bc4afaf
short: 20ko
size: 4
url: https://pb.zhuoran.io/mom
status: created
uuid: bac23f0c-0f06-4525-8ae4-624268485ef7
> echo "This message will self-destruct in 60 seconds" | curl -F sunset=60 -F c=@- https://pb.zhuoran.io
date: 2021-01-16 03:32:33.225306167 UTC
digest: 15cefec0e22ce1b1bfc1d06c77620cc41f8d6f1664edb0a8d63b5d0b6ef5a7
short: 19vl
size: 45
url: https://pb.zhuoran.io/19vl
status: created
uuid: 7ede8735-7af3-4ee7-87bb-fc63d2a39306
> curl https://pb.zhuoran.io/19vl
This message will self-destruct in 60 seconds
> sleep 60
> curl https://pb.zhuoran.io/19vl
expired
digest 为内容的 SHA-256(rspb 用 blake3);short 同样由内容哈希派生,相同内容会得到相同 short 并返回 status: existed。
存储上限 4 GiB(保护 R2 免费额度),写满后创建/更新返回 507 storage quota exceeded,删除或过期后自动腾出空间。
所有 paste 自最后写入起最长保留 30 天,到期直接删除、不做备份;更新(PUT)或重复上传同内容会续期。定时任务每天清理,访问到已过期的 paste 也会顺带删除。