Merge pull request #14266 from overleaf/bg-node-18-avoid-chunked-uploads

send content-length header when creating blobs

GitOrigin-RevId: fd541f307786cc883c6545ed8dfb750b03a025f2
This commit is contained in:
Brian Gough 2023-08-11 09:05:51 +01:00 committed by Copybot
parent c71bf25363
commit 06c3de586a

View file

@ -312,6 +312,7 @@ function _createBlob(historyId, fsPath, _callback) {
fetchNothing(url, {
method: 'PUT',
body: outStream,
headers: { 'Content-Length': byteLength }, // add the content length to work around problems with chunked encoding in node 18
...getHistoryFetchOptions(),
})
.then(res => {