mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🎨 PDF files larger than 128MB are not included in asset file content searching https://github.com/siyuan-note/siyuan/issues/9500
This commit is contained in:
parent
28db71aaf4
commit
f7e6f61099
4 changed files with 19 additions and 17 deletions
|
|
@ -5,7 +5,7 @@
|
|||
"Properties": {
|
||||
"id": "20230805232134-3d6mx2k",
|
||||
"title": "Search asset content",
|
||||
"updated": "20231025095300"
|
||||
"updated": "20231025095559"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
"ListData": {},
|
||||
"Properties": {
|
||||
"id": "20230903112419-45ps71g",
|
||||
"updated": "20231025095300"
|
||||
"updated": "20231025095559"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -253,7 +253,8 @@
|
|||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20231025095244-lpf6spo"
|
||||
"id": "20231025095244-lpf6spo",
|
||||
"updated": "20231025095559"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -261,12 +262,12 @@
|
|||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20231025095244-m8ut4h2",
|
||||
"updated": "20231025095244"
|
||||
"updated": "20231025095559"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "PDFs larger than 64MB or 1024 pages are not supported"
|
||||
"Data": "PDFs larger than 128MB or 1024 pages are not supported"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Properties": {
|
||||
"id": "20230805230218-aea8icj",
|
||||
"title": "搜索资源文件内容",
|
||||
"updated": "20231025095306"
|
||||
"updated": "20231025095556"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -217,7 +217,7 @@
|
|||
"ListData": {},
|
||||
"Properties": {
|
||||
"id": "20230903112243-pwm33kc",
|
||||
"updated": "20231025095306"
|
||||
"updated": "20231025095556"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -255,7 +255,8 @@
|
|||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20231025095053-a0quwv1"
|
||||
"id": "20231025095053-a0quwv1",
|
||||
"updated": "20231025095556"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -263,12 +264,12 @@
|
|||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20231025095053-ee3etgb",
|
||||
"updated": "20231025095107"
|
||||
"updated": "20231025095556"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "不支持大于 64MB 或 1024 页的 PDF"
|
||||
"Data": "不支持大于 128MB 或 1024 页的 PDF"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Properties": {
|
||||
"id": "20230805232920-5fdco36",
|
||||
"title": "搜索資源文件內容",
|
||||
"updated": "20231025095336"
|
||||
"updated": "20231025095553"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
"ListData": {},
|
||||
"Properties": {
|
||||
"id": "20230903112449-mq7jbfe",
|
||||
"updated": "20231025095336"
|
||||
"updated": "20231025095553"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
},
|
||||
"Properties": {
|
||||
"id": "20231025095319-kupw6kw",
|
||||
"updated": "20231025095323"
|
||||
"updated": "20231025095553"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
|
@ -267,12 +267,12 @@
|
|||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20231025095319-egfy5yi",
|
||||
"updated": "20231025095323"
|
||||
"updated": "20231025095553"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "不支援大於 64MB 或 1024 頁的 PDF"
|
||||
"Data": "不支援大於 128MB 或 1024 頁的 PDF"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ func NewAssetsSearcher() *AssetsSearcher {
|
|||
const (
|
||||
TxtAssetContentMaxSize = 1024 * 1024 * 4
|
||||
PDFAssetContentMaxPage = 1024
|
||||
PDFAssetContentMaxSize = 1024 * 1024 * 64
|
||||
PDFAssetContentMaxSize = 1024 * 1024 * 128
|
||||
)
|
||||
|
||||
type AssetParseResult struct {
|
||||
|
|
@ -830,7 +830,7 @@ func (parser *PdfAssetParser) Parse(absPath string) (ret *AssetParseResult) {
|
|||
}
|
||||
|
||||
if PDFAssetContentMaxSize < len(pdfData) {
|
||||
// PDF files larger than 64MB are not included in asset file content searching https://github.com/siyuan-note/siyuan/issues/9500
|
||||
// PDF files larger than 128MB are not included in asset file content searching https://github.com/siyuan-note/siyuan/issues/9500
|
||||
logging.LogWarnf("ignore large PDF asset [%s] with [%s]", absPath, humanize.Bytes(uint64(len(pdfData))))
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue