fix: bound browser image previews
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
import { DEFAULT_BROWSER_IMAGE_SAFETY_LIMITS } from '../image-safety.js';
|
||||
|
||||
export interface OneNoteParserLimits {
|
||||
maxFileBytes: number;
|
||||
maxTransactionFragments: number;
|
||||
@@ -18,6 +20,9 @@ export interface OneNoteParserLimits {
|
||||
maxFileDataObjects: number;
|
||||
maxFileDataBytes: number;
|
||||
maxTotalFileDataBytes: number;
|
||||
maxAutoRenderImageBytes: number;
|
||||
maxAutoRenderImageDimension: number;
|
||||
maxAutoRenderImagePixels: number;
|
||||
maxGraphDepth: number;
|
||||
maxContentBlocks: number;
|
||||
maxTextRuns: number;
|
||||
@@ -44,6 +49,9 @@ export const DEFAULT_ONENOTE_PARSER_LIMITS: Readonly<OneNoteParserLimits> = {
|
||||
maxFileDataObjects: 10_000,
|
||||
maxFileDataBytes: 256 * 1024 * 1024,
|
||||
maxTotalFileDataBytes: 512 * 1024 * 1024,
|
||||
maxAutoRenderImageBytes: DEFAULT_BROWSER_IMAGE_SAFETY_LIMITS.maxBytes,
|
||||
maxAutoRenderImageDimension: DEFAULT_BROWSER_IMAGE_SAFETY_LIMITS.maxDimension,
|
||||
maxAutoRenderImagePixels: DEFAULT_BROWSER_IMAGE_SAFETY_LIMITS.maxPixels,
|
||||
maxGraphDepth: 256,
|
||||
maxContentBlocks: 1_000_000,
|
||||
maxTextRuns: 1_000_000,
|
||||
|
||||
Reference in New Issue
Block a user