From 0b9b2037625441cd5a767c000b86e5653cc7e63c Mon Sep 17 00:00:00 2001 From: Bennett Buchanan Date: Tue, 24 Apr 2018 13:19:50 -0700 Subject: [PATCH] bf: ZENKO-275 CRR to GCP MPU properties --- lib/data/external/GCP/GcpApis/mpuHelper.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/data/external/GCP/GcpApis/mpuHelper.js b/lib/data/external/GCP/GcpApis/mpuHelper.js index c14e01a66d..fc9e5eea14 100644 --- a/lib/data/external/GCP/GcpApis/mpuHelper.js +++ b/lib/data/external/GCP/GcpApis/mpuHelper.js @@ -259,10 +259,11 @@ class MpuHelper { err); return next(err); } - return next(null, res.Metadata); + return next(null, res); }); }, - (metadata, next) => { + (res, next) => { + const metadata = res.Metadata; // copy the final object into the main bucket const copyMetadata = Object.assign({}, metadata); copyMetadata['scal-etag'] = aggregateETag; @@ -272,6 +273,11 @@ class MpuHelper { Metadata: copyMetadata, MetadataDirective: 'REPLACE', CopySource: `${params.MPU}/${copySource}`, + ContentType: res.ContentType, + CacheControl: res.CacheControl, + ContentEncoding: res.ContentEncoding, + ContentDisposition: res.ContentDisposition, + ContentLanguage: res.ContentLanguage, }; logger.trace('copyParams', { copyParams }); this.retryCopy(copyParams, (err, res) => {