diff --git a/lib/notion/getPostBlocks.js b/lib/notion/getPostBlocks.js index 97b70af7..0b0e50e7 100644 --- a/lib/notion/getPostBlocks.js +++ b/lib/notion/getPostBlocks.js @@ -139,12 +139,10 @@ function convertNotionBlocksToPost(id, blockMap, slice) { // 如果是文件,或嵌入式PDF,需要重新加密签名 if ( - (b?.value?.type === 'file' || - b?.value?.type === 'pdf' || - b?.value?.type === 'video' || - b?.value?.type === 'audio') && + ['file', 'pdf', 'video', 'audio'].includes(b?.value?.type) && b?.value?.properties?.source?.[0][0] && - b?.value?.properties?.source?.[0][0].indexOf('attachment') === 0 + (b?.value?.properties?.source?.[0][0].indexOf('attachment') === 0 || + b?.value?.properties?.source?.[0][0].indexOf('amazonaws.com') > 0) ) { const oldUrl = b?.value?.properties?.source?.[0][0] const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`