mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
fix:仅对 attachment 开头的上传文件签名,跳过 embed 链接
This commit is contained in:
@@ -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}`
|
||||
|
||||
Reference in New Issue
Block a user