OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
26
.dev/remote-deploy/41_test_attach.sh
Normal file
26
.dev/remote-deploy/41_test_attach.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
cd /var/www/onebot
|
||||
|
||||
echo "=== 1. 取一个附件字段原始值 ==="
|
||||
curl -s -m 20 "https://table.universal-onebot.com/api/table/tblGHwQc8eAGFZcZ71A/record?fieldKeyType=name&take=1" \
|
||||
-H "Authorization: Bearer teable_accaWtlglDjnwkieJXE_KaafZue9411p5G+QmP0r4zRsC6GDpUTuRDVfh2f8eco=" \
|
||||
| php -r '$d=json_decode(stream_get_contents(STDIN),true); $f=$d["records"][0]["fields"]["缩略图"][0] ?? []; echo json_encode($f, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);'
|
||||
|
||||
echo ""
|
||||
echo "=== 2. 提取 smThumbnailUrl 并测试直连(不带 Bearer) ==="
|
||||
URL=$(curl -s -m 20 "https://table.universal-onebot.com/api/table/tblGHwQc8eAGFZcZ71A/record?fieldKeyType=name&take=1" \
|
||||
-H "Authorization: Bearer teable_accaWtlglDjnwkieJXE_KaafZue9411p5G+QmP0r4zRsC6GDpUTuRDVfh2f8eco=" \
|
||||
| php -r '$d=json_decode(stream_get_contents(STDIN),true); $f=$d["records"][0]["fields"]["缩略图"][0] ?? []; echo $f["smThumbnailUrl"] ?? "";')
|
||||
echo "smThumbnailUrl=$URL"
|
||||
if [ -n "$URL" ]; then
|
||||
FULL="https://table.universal-onebot.com$URL"
|
||||
echo "--- 直连(无 Bearer)---"
|
||||
curl -s -m 15 -o /dev/null -w "HTTP=%{http_code} type=%{content_type} size=%{size_download}\n" "$FULL"
|
||||
echo "--- 带 Bearer ---"
|
||||
curl -s -m 15 -o /dev/null -w "HTTP=%{http_code} type=%{content_type} size=%{size_download}\n" -H "Authorization: Bearer teable_accaWtlglDjnwkieJXE_KaafZue9411p5G+QmP0r4zRsC6GDpUTuRDVfh2f8eco=" "$FULL"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=== 3. CDN 可达性测试(Handsontable) ==="
|
||||
curl -s -m 10 -o /dev/null -w "jsdelivr HTTP=%{http_code}\n" "https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js" 2>&1 || echo "jsdelivr 不可达"
|
||||
curl -s -m 10 -o /dev/null -w "unpkg HTTP=%{http_code}\n" "https://unpkg.com/handsontable/dist/handsontable.full.min.js" 2>&1 || echo "unpkg 不可达"
|
||||
Reference in New Issue
Block a user