diff --git a/bin/config.js b/bin/config.js index 1c649e1..03259f5 100644 --- a/bin/config.js +++ b/bin/config.js @@ -64,7 +64,7 @@ const DFsConfig = () => { let chunkSize = parseInt(CHUNK_SIZE, 10) if (!_.isFinite(chunkSize) || chunkSize < 1 - || chunkSize > 8388608) chunkSize = 7864320 // 7.5 MB + || chunkSize > 26109542) chunkSize = 25165824 // 24 MB // Set proper request timeout let timeout = parseInt(REQUEST_TIMEOUT, 10) diff --git a/src/DFs/index.js b/src/DFs/index.js index b4b9daa..a80083c 100644 --- a/src/DFs/index.js +++ b/src/DFs/index.js @@ -8,7 +8,7 @@ const AsyncStreamProcessorWithConcurrency = require('./lib/AsyncStreamProcessorW const AsyncStreamProcessor = require('./lib/AsyncStreamProcessor') const StreamChunker = require('./lib/StreamChunker') -const DEFAULT_CHUNK_SIZE = 7864320 // 7.5MB +const DEFAULT_CHUNK_SIZE = 25165824 // 24MB const DEFAULT_ENCRYPTION = 'aes-256-ctr' const DEFAULT_REST_OPTS = { version: 10, timeout: 60000 } const DEFAULT_MAX_UPLOAD_CONCURRENCY = 3 @@ -31,8 +31,8 @@ class DiscordFileSystem { if (!_.isFinite(this.chunkSize) || this.chunkSize < 1 - || this.chunkSize > 8388608) { - throw new Error('Invalid chunkSize - chunkSize should be valid number and > 1 and < 8388608') + || this.chunkSize > 26109542) { + throw new Error('Invalid chunkSize - chunkSize should be valid number and > 1 and < 26109542') } const { timeout } = opts.restOpts