From a67e9086a0efbc3a5dc42d451f7d5aaf539f0282 Mon Sep 17 00:00:00 2001 From: LooseLi <1329307562@qq.com> Date: Tue, 15 Apr 2025 10:47:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BB=85=E5=AF=B9=20attachment=20?= =?UTF-8?q?=E5=BC=80=E5=A4=B4=E7=9A=84=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=AD=BE=E5=90=8D=EF=BC=8C=E8=B7=B3=E8=BF=87=20embed=20?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getPostBlocks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/notion/getPostBlocks.js b/lib/notion/getPostBlocks.js index fb486d61..97b70af7 100644 --- a/lib/notion/getPostBlocks.js +++ b/lib/notion/getPostBlocks.js @@ -143,7 +143,8 @@ function convertNotionBlocksToPost(id, blockMap, slice) { b?.value?.type === 'pdf' || b?.value?.type === 'video' || b?.value?.type === 'audio') && - b?.value?.properties?.source?.[0][0] + b?.value?.properties?.source?.[0][0] && + b?.value?.properties?.source?.[0][0].indexOf('attachment') === 0 ) { const oldUrl = b?.value?.properties?.source?.[0][0] const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`