MCPcopy Index your code
hub / github.com/scality/cloudserver / getPartCountFromMd5

Function getPartCountFromMd5

lib/api/apiUtils/object/partInfo.js:62–68  ·  view source on GitHub ↗

* Gets parts count if object was put with mpu * @param {object} objMD - object metadata * @return {(Integer|null)} - number of parts of mpu object or null

(objMD)

Source from the content-addressed store, hash-verified

60 * @return {(Integer|null)} - number of parts of mpu object or null
61 */
62function getPartCountFromMd5(objMD) {
63 const md5 = objMD['content-md5'];
64 if (md5.includes('-')) {
65 return md5.split('-')[1];
66 }
67 return null;
68}
69
70module.exports = {
71 getPartNumber,

Callers 3

objectHeadFunction · 0.85
objectGetFunction · 0.85
buildAttributesXmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected