UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 663 B
//!extensions/file-transfer/src/shared/file-fetch-protocol.ts const FILE_FETCH_DEFAULT_MAX_BYTES=8388608;const FILE_FETCH_HARD_MAX_BYTES=16777216;const FILE_FETCH_CHUNK_BYTES=1048576;function readFileFetchBinaryMaxBytes(e){if(e.transport===void 0)return;if(e.transport!==`binary`)throw new Error(`file.fetch transport must be "binary" when supplied`);if(typeof e.maxBytes!==`number`||!Number.isSafeInteger(e.maxBytes)||e.maxBytes<=0)throw new Error(`binary file.fetch maxBytes must be a positive safe integer`);return e.maxBytes}export{readFileFetchBinaryMaxBytes as i,FILE_FETCH_DEFAULT_MAX_BYTES as n,FILE_FETCH_HARD_MAX_BYTES as r,FILE_FETCH_CHUNK_BYTES as t};