PDF 嵌入BUG

This commit is contained in:
tangly1024.com
2023-09-07 16:10:48 +08:00
parent 9b29c0d82d
commit 66ce9b9411

View File

@@ -101,8 +101,8 @@ function filterPostBlocks(id, pageBlock, slice) {
}
}
// 如果是文件,需要重新加密签名
if (b?.value?.type === 'file' && b?.value?.properties?.source?.[0][0]) {
// 如果是文件,或嵌入式PDF需要重新加密签名
if ((b?.value?.type === 'file' || b?.value?.type === 'pdf') && 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}`
b.value.properties.source[0][0] = newUrl