mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 14:23:35 +00:00
Use large upload chunks
This commit is contained in:
parent
4e507197fc
commit
5adfb3e2c0
2 changed files with 7 additions and 1 deletions
|
@ -96,7 +96,7 @@ async function sendStream(bucketName, key, readStream, sourceMd5) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await _getClientForBucket(bucketName)
|
const response = await _getClientForBucket(bucketName)
|
||||||
.upload(uploadOptions)
|
.upload(uploadOptions, { partSize: 100 * 1024 * 1024 })
|
||||||
.promise()
|
.promise()
|
||||||
const destMd5 = _md5FromResponse(response)
|
const destMd5 = _md5FromResponse(response)
|
||||||
|
|
||||||
|
|
|
@ -460,6 +460,12 @@ describe('S3PersistorTests', function() {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should upload files in a single part', function() {
|
||||||
|
expect(S3Client.upload).to.have.been.calledWith(sinon.match.any, {
|
||||||
|
partSize: 100 * 1024 * 1024
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it('should meter the stream', function() {
|
it('should meter the stream', function() {
|
||||||
expect(Stream.pipeline).to.have.been.calledWith(
|
expect(Stream.pipeline).to.have.been.calledWith(
|
||||||
ReadStream,
|
ReadStream,
|
||||||
|
|
Loading…
Reference in a new issue