Compare commits
4 Commits
developmen
...
featureu/Z
Author | SHA1 | Date |
---|---|---|
Jianqin Wang | 4609f18352 | |
Jianqin Wang | 3e6968b55a | |
Jianqin Wang | 47e0a24b8c | |
Jianqin Wang | 4b0ecf25f8 |
|
@ -735,7 +735,7 @@ class DataWrapper {
|
||||||
*/
|
*/
|
||||||
_putForCopy(cipherBundle, stream, part, dataStoreContext, destBackendInfo,
|
_putForCopy(cipherBundle, stream, part, dataStoreContext, destBackendInfo,
|
||||||
log, cb) {
|
log, cb) {
|
||||||
return this.put(cipherBundle, stream, part.size, dataStoreContext,
|
return this.put(cipherBundle, stream, part, dataStoreContext,
|
||||||
destBackendInfo, log, (error, partRetrievalInfo) => {
|
destBackendInfo, log, (error, partRetrievalInfo) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
return cb(error);
|
return cb(error);
|
||||||
|
|
|
@ -46,6 +46,8 @@ class AzureClient {
|
||||||
try {
|
try {
|
||||||
this._client[azureMethod].apply(this._client, args);
|
this._client[azureMethod].apply(this._client, args);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.log('ERROR IS', err);
|
||||||
|
console.log('ARGS WERE', args);
|
||||||
const error = errors.ServiceUnavailable;
|
const error = errors.ServiceUnavailable;
|
||||||
if (log) {
|
if (log) {
|
||||||
log.error('error thrown by Azure Storage Client Library',
|
log.error('error thrown by Azure Storage Client Library',
|
||||||
|
@ -155,6 +157,7 @@ class AzureClient {
|
||||||
return callback(null, azureKey);
|
return callback(null, azureKey);
|
||||||
}], log, callback);
|
}], log, callback);
|
||||||
}
|
}
|
||||||
|
console.log('PARAMS ARE', this._azureContainerName, azureKey, stream, size, options);
|
||||||
return this._errorWrapper('put', 'createBlockBlobFromStream',
|
return this._errorWrapper('put', 'createBlockBlobFromStream',
|
||||||
[this._azureContainerName, azureKey, stream, size, options,
|
[this._azureContainerName, azureKey, stream, size, options,
|
||||||
err => {
|
err => {
|
||||||
|
|
|
@ -148,6 +148,8 @@ const utils = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
translateAzureMetaHeaders(metaHeaders, tags) {
|
translateAzureMetaHeaders(metaHeaders, tags) {
|
||||||
|
console.log('TAGS ARE', tags);
|
||||||
|
console.log('meta headers are', metaHeaders);
|
||||||
const translatedMetaHeaders = {};
|
const translatedMetaHeaders = {};
|
||||||
if (tags) {
|
if (tags) {
|
||||||
// tags are passed as string of format 'key1=value1&key2=value2'
|
// tags are passed as string of format 'key1=value1&key2=value2'
|
||||||
|
@ -160,10 +162,12 @@ const utils = {
|
||||||
});
|
});
|
||||||
translatedMetaHeaders.tags = JSON.stringify(tagObj);
|
translatedMetaHeaders.tags = JSON.stringify(tagObj);
|
||||||
}
|
}
|
||||||
Object.keys(metaHeaders).forEach(headerName => {
|
if (metaHeaders) {
|
||||||
const translated = headerName.substring(11).replace(/-/g, '_');
|
Object.keys(metaHeaders).forEach(headerName => {
|
||||||
translatedMetaHeaders[translated] = metaHeaders[headerName];
|
const translated = headerName.substring(11).replace(/-/g, '_');
|
||||||
});
|
translatedMetaHeaders[translated] = metaHeaders[headerName];
|
||||||
|
});
|
||||||
|
}
|
||||||
return translatedMetaHeaders;
|
return translatedMetaHeaders;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue