mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
fix: enable all Notion file types to work properly
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { getDataFromCache, getOrSetDataWithCache, setDataToCache } from '@/lib/cache/cache_manager'
|
||||
import {
|
||||
getDataFromCache,
|
||||
getOrSetDataWithCache,
|
||||
setDataToCache
|
||||
} from '@/lib/cache/cache_manager'
|
||||
import { deepClone, delay } from '../utils'
|
||||
import notionAPI from '@/lib/notion/getNotionAPI'
|
||||
|
||||
@@ -139,8 +143,7 @@ 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].indexOf('amazonaws.com') > 0
|
||||
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}`
|
||||
|
||||
Reference in New Issue
Block a user