diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-21 17:19:16 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-21 17:19:16 +0100 |
commit | bfe2ef6bfae03444a232883fc7c449206cf3bee4 (patch) | |
tree | d1ee39e1700f6918c2799c5537da771bda468890 /server/lib | |
parent | 539d3f4faa1c1d2dbc68bb3ac0ba3549252e0f2a (diff) | |
download | PeerTube-bfe2ef6bfae03444a232883fc7c449206cf3bee4.tar.gz PeerTube-bfe2ef6bfae03444a232883fc7c449206cf3bee4.tar.zst PeerTube-bfe2ef6bfae03444a232883fc7c449206cf3bee4.zip |
Add request body limit
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/hls.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts index 3575981f4..16a805ac2 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts | |||
@@ -116,7 +116,8 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string, | |||
116 | for (const fileUrl of fileUrls) { | 116 | for (const fileUrl of fileUrls) { |
117 | const destPath = join(tmpDirectory, basename(fileUrl)) | 117 | const destPath = join(tmpDirectory, basename(fileUrl)) |
118 | 118 | ||
119 | await doRequestAndSaveToFile({ uri: fileUrl }, destPath) | 119 | const bodyKBLimit = 10 * 1000 * 1000 // 10GB |
120 | await doRequestAndSaveToFile({ uri: fileUrl }, destPath, bodyKBLimit) | ||
120 | } | 121 | } |
121 | 122 | ||
122 | clearTimeout(timer) | 123 | clearTimeout(timer) |