mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Improve/add some comments for clarity
This commit is contained in:
parent
def383574e
commit
a7198764cb
2 changed files with 12 additions and 5 deletions
|
@ -78,11 +78,12 @@ async function sendStream(bucketName, key, readStream, sourceMd5) {
|
|||
|
||||
const meteredStream = PersistorHelper.getMeteredStream(
|
||||
readStream,
|
||||
'gcs.egress'
|
||||
'gcs.egress' // egress from us to gcs
|
||||
)
|
||||
|
||||
const writeOptions = {
|
||||
resumable: false // recommended by Google
|
||||
// disabling of resumable uploads is recommended by Google:
|
||||
resumable: false
|
||||
}
|
||||
|
||||
if (sourceMd5) {
|
||||
|
@ -126,7 +127,10 @@ async function getFileStream(bucketName, key, opts = {}) {
|
|||
.file(key)
|
||||
.createReadStream(opts)
|
||||
|
||||
const meteredStream = PersistorHelper.getMeteredStream(stream, 'gcs.ingress')
|
||||
const meteredStream = PersistorHelper.getMeteredStream(
|
||||
stream,
|
||||
'gcs.ingress' // ingress to us from gcs
|
||||
)
|
||||
|
||||
try {
|
||||
await PersistorHelper.waitForStreamReady(stream)
|
||||
|
|
|
@ -74,7 +74,7 @@ async function sendStream(bucketName, key, readStream, sourceMd5) {
|
|||
|
||||
const meteredStream = PersistorHelper.getMeteredStream(
|
||||
readStream,
|
||||
's3.egress'
|
||||
's3.egress' // egress from us to s3
|
||||
)
|
||||
|
||||
// if we have an md5 hash, pass this to S3 to verify the upload
|
||||
|
@ -139,7 +139,10 @@ async function getFileStream(bucketName, key, opts) {
|
|||
.getObject(params)
|
||||
.createReadStream()
|
||||
|
||||
const meteredStream = PersistorHelper.getMeteredStream(stream, 's3.ingress')
|
||||
const meteredStream = PersistorHelper.getMeteredStream(
|
||||
stream,
|
||||
's3.ingress' // ingress to us from s3
|
||||
)
|
||||
|
||||
try {
|
||||
await PersistorHelper.waitForStreamReady(stream)
|
||||
|
|
Loading…
Reference in a new issue