Compare commits
9 Commits
developmen
...
bugfix/ARS
Author | SHA1 | Date |
---|---|---|
williamlardier | cb03323c13 | |
williamlardier | 21828e6fe7 | |
williamlardier | df6c58df6e | |
williamlardier | 4af9eef84a | |
williamlardier | 99130fe093 | |
williamlardier | 41d21d61d9 | |
williamlardier | 4d7ab6411c | |
williamlardier | af38e8f7af | |
williamlardier | 087c1710bf |
12
index.ts
12
index.ts
|
@ -63,8 +63,8 @@ export const s3routes = {
|
||||||
|
|
||||||
export const s3middleware = {
|
export const s3middleware = {
|
||||||
userMetadata: require('./lib/s3middleware/userMetadata'),
|
userMetadata: require('./lib/s3middleware/userMetadata'),
|
||||||
convertToXml: require('./lib/s3middleware/convertToXml'),
|
convertToXml: require('./lib/s3middleware/convertToXml').default,
|
||||||
escapeForXml: require('./lib/s3middleware/escapeForXml'),
|
escapeForXml: require('./lib/s3middleware/escapeForXml').default,
|
||||||
objectLegalHold: require('./lib/s3middleware/objectLegalHold'),
|
objectLegalHold: require('./lib/s3middleware/objectLegalHold'),
|
||||||
tagging: require('./lib/s3middleware/tagging'),
|
tagging: require('./lib/s3middleware/tagging'),
|
||||||
checkDateModifiedHeaders:
|
checkDateModifiedHeaders:
|
||||||
|
@ -73,16 +73,16 @@ export const s3middleware = {
|
||||||
validateConditionalHeaders:
|
validateConditionalHeaders:
|
||||||
require('./lib/s3middleware/validateConditionalHeaders')
|
require('./lib/s3middleware/validateConditionalHeaders')
|
||||||
.validateConditionalHeaders,
|
.validateConditionalHeaders,
|
||||||
MD5Sum: require('./lib/s3middleware/MD5Sum'),
|
MD5Sum: require('./lib/s3middleware/MD5Sum').default,
|
||||||
NullStream: require('./lib/s3middleware/nullStream'),
|
NullStream: require('./lib/s3middleware/nullStream').default,
|
||||||
objectUtils: require('./lib/s3middleware/objectUtils'),
|
objectUtils: require('./lib/s3middleware/objectUtils'),
|
||||||
azureHelper: {
|
azureHelper: {
|
||||||
mpuUtils:
|
mpuUtils:
|
||||||
require('./lib/s3middleware/azureHelpers/mpuUtils'),
|
require('./lib/s3middleware/azureHelpers/mpuUtils'),
|
||||||
ResultsCollector:
|
ResultsCollector:
|
||||||
require('./lib/s3middleware/azureHelpers/ResultsCollector'),
|
require('./lib/s3middleware/azureHelpers/ResultsCollector').default,
|
||||||
SubStreamInterface:
|
SubStreamInterface:
|
||||||
require('./lib/s3middleware/azureHelpers/SubStreamInterface'),
|
require('./lib/s3middleware/azureHelpers/SubStreamInterface').default,
|
||||||
},
|
},
|
||||||
prepareStream: require('./lib/s3middleware/prepareStream'),
|
prepareStream: require('./lib/s3middleware/prepareStream'),
|
||||||
processMpuParts: require('./lib/s3middleware/processMpuParts'),
|
processMpuParts: require('./lib/s3middleware/processMpuParts'),
|
||||||
|
|
|
@ -3,7 +3,7 @@ const UUID = require('uuid');
|
||||||
|
|
||||||
const errors = require('../errors').default;
|
const errors = require('../errors').default;
|
||||||
const LifecycleRule = require('./LifecycleRule');
|
const LifecycleRule = require('./LifecycleRule');
|
||||||
const escapeForXml = require('../s3middleware/escapeForXml');
|
const escapeForXml = require('../s3middleware/escapeForXml').default;
|
||||||
|
|
||||||
const MAX_DAYS = 2147483647; // Max 32-bit signed binary integer.
|
const MAX_DAYS = 2147483647; // Max 32-bit signed binary integer.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const UUID = require('uuid');
|
const UUID = require('uuid');
|
||||||
|
|
||||||
const escapeForXml = require('../s3middleware/escapeForXml');
|
const escapeForXml = require('../s3middleware/escapeForXml').default;
|
||||||
const errors = require('../errors').default;
|
const errors = require('../errors').default;
|
||||||
const { isValidBucketName } = require('../s3routes/routesUtils');
|
const { isValidBucketName } = require('../s3routes/routesUtils');
|
||||||
|
|
||||||
|
|
|
@ -94,9 +94,7 @@ export const listMultipartUploads = (xmlParams: ListParams) => {
|
||||||
params.forEach(param => {
|
params.forEach(param => {
|
||||||
if (param.value) {
|
if (param.value) {
|
||||||
xml.push(
|
xml.push(
|
||||||
`<${param.tag}>
|
`<${param.tag}>${escapeForXml(param.value)}</${param.tag}>`
|
||||||
${escapeForXml(param.value)}
|
|
||||||
</${param.tag}>`
|
|
||||||
);
|
);
|
||||||
} else if (!param.optional) {
|
} else if (!param.optional) {
|
||||||
xml.push(`<${param.tag} />`);
|
xml.push(`<${param.tag} />`);
|
||||||
|
@ -123,7 +121,7 @@ export const listMultipartUploads = (xmlParams: ListParams) => {
|
||||||
`<ID>${escapeForXml(val.Initiator.ID)}</ID>`,
|
`<ID>${escapeForXml(val.Initiator.ID)}</ID>`,
|
||||||
`<DisplayName>`,
|
`<DisplayName>`,
|
||||||
escapeForXml(val.Initiator.DisplayName),
|
escapeForXml(val.Initiator.DisplayName),
|
||||||
'/DisplayName>',
|
'</DisplayName>',
|
||||||
'</Initiator>',
|
'</Initiator>',
|
||||||
'<Owner>',
|
'<Owner>',
|
||||||
`<ID>${escapeForXml(val.Owner.ID)}</ID>`,
|
`<ID>${escapeForXml(val.Owner.ID)}</ID>`,
|
||||||
|
|
|
@ -14,7 +14,7 @@ export function getMetaHeaders(headers: http.IncomingHttpHeaders) {
|
||||||
if (!v) return length;
|
if (!v) return length;
|
||||||
return length + k.length + v.toString().length;
|
return length + k.length + v.toString().length;
|
||||||
}, 0);
|
}, 0);
|
||||||
if (totalLength < constants.maximumMetaHeadersSize) {
|
if (totalLength <= constants.maximumMetaHeadersSize) {
|
||||||
return Object.fromEntries(filtered);
|
return Object.fromEntries(filtered);
|
||||||
} else {
|
} else {
|
||||||
return errors.MetadataTooLarge;
|
return errors.MetadataTooLarge;
|
||||||
|
|
|
@ -3,8 +3,8 @@ const PassThrough = require('stream').PassThrough;
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
|
|
||||||
const errors = require('../../errors').default;
|
const errors = require('../../errors').default;
|
||||||
const MD5Sum = require('../../s3middleware/MD5Sum');
|
const MD5Sum = require('../../s3middleware/MD5Sum').default;
|
||||||
const NullStream = require('../../s3middleware/nullStream');
|
const NullStream = require('../../s3middleware/nullStream').default;
|
||||||
const RelayMD5Sum = require('./utils/RelayMD5Sum');
|
const RelayMD5Sum = require('./utils/RelayMD5Sum');
|
||||||
const backendUtils = require('./external/utils');
|
const backendUtils = require('./external/utils');
|
||||||
const constants = require('../../constants');
|
const constants = require('../../constants');
|
||||||
|
|
|
@ -2,7 +2,7 @@ const AWS = require('aws-sdk');
|
||||||
const werelogs = require('werelogs');
|
const werelogs = require('werelogs');
|
||||||
|
|
||||||
const errors = require('../../../errors').default;
|
const errors = require('../../../errors').default;
|
||||||
const MD5Sum = require('../../../s3middleware/MD5Sum');
|
const MD5Sum = require('../../../s3middleware/MD5Sum').default;
|
||||||
const getMetaHeaders =
|
const getMetaHeaders =
|
||||||
require('../../../s3middleware/userMetadata').getMetaHeaders;
|
require('../../../s3middleware/userMetadata').getMetaHeaders;
|
||||||
const { prepareStream } = require('../../../s3middleware/prepareStream');
|
const { prepareStream } = require('../../../s3middleware/prepareStream');
|
||||||
|
|
|
@ -2,7 +2,7 @@ const url = require('url');
|
||||||
|
|
||||||
const azure = require('azure-storage');
|
const azure = require('azure-storage');
|
||||||
const errors = require('../../../errors').default;
|
const errors = require('../../../errors').default;
|
||||||
const azureMpuUtils = require('../../../s3middleware/azureHelpers/mpuUtils');
|
const azureMpuUtils = require('../../../s3middleware/azureHelpers/mpuUtils').default;
|
||||||
const { validateAndFilterMpuParts } =
|
const { validateAndFilterMpuParts } =
|
||||||
require('../../../s3middleware/processMpuParts');
|
require('../../../s3middleware/processMpuParts');
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
|
|
||||||
const errors = require('../../../errors').default;
|
const errors = require('../../../errors').default;
|
||||||
const MD5Sum = require('../../../s3middleware/MD5Sum');
|
const MD5Sum = require('../../../s3middleware/MD5Sum').default;
|
||||||
const { GCP, GcpUtils } = require('./GCP');
|
const { GCP, GcpUtils } = require('./GCP');
|
||||||
const { createMpuKey } = GcpUtils;
|
const { createMpuKey } = GcpUtils;
|
||||||
const AwsClient = require('./AwsClient');
|
const AwsClient = require('./AwsClient');
|
||||||
|
|
Loading…
Reference in New Issue