🎨 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:
Daniel 2023-10-25 09:56:27 +08:00
parent 28db71aaf4
commit f7e6f61099
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 19 additions and 17 deletions

View file

@ -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
}