mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 07:26:45 +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 === 'pdf' ||
|
||||||
b?.value?.type === 'video' ||
|
b?.value?.type === 'video' ||
|
||||||
b?.value?.type === 'audio') &&
|
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 oldUrl = b?.value?.properties?.source?.[0][0]
|
||||||
const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`
|
const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`
|
||||||
|
|||||||
Reference in New Issue
Block a user