diff --git a/services/filestore/app/js/GcsPersistor.js b/services/filestore/app/js/GcsPersistor.js index 9ddf608e90..61b3e814b0 100644 --- a/services/filestore/app/js/GcsPersistor.js +++ b/services/filestore/app/js/GcsPersistor.js @@ -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) diff --git a/services/filestore/app/js/S3Persistor.js b/services/filestore/app/js/S3Persistor.js index e50a9e3030..4403386716 100644 --- a/services/filestore/app/js/S3Persistor.js +++ b/services/filestore/app/js/S3Persistor.js @@ -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)