Comparing version 7.3.1 to 7.3.2
## CHANGE LOG | ||
## 7.3.2 | ||
修复crc32指定值无效 | ||
修复checkCrc指定无效 | ||
统一checkCrc类型 | ||
## 7.3.1 | ||
@@ -4,0 +9,0 @@ 新增归档存储解冻接口 |
{ | ||
"name": "qiniu", | ||
"version": "7.3.1", | ||
"version": "7.3.2", | ||
"description": "Node wrapper for Qiniu Resource (Cloud) Storage API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -29,3 +29,3 @@ const conf = require('../conf'); | ||
this.crc32 = crc32 || null; | ||
this.checkCrc = checkCrc || 1; | ||
this.checkCrc = checkCrc || true; | ||
} | ||
@@ -126,6 +126,12 @@ | ||
fsStream.on('end', function () { | ||
fileBody = Buffer.concat(fileBody); | ||
var bodyCrc32 = parseInt('0x' + getCrc32(fileBody)); | ||
postForm.field('crc32', bodyCrc32); | ||
fsStream.on('end', function() { | ||
if (putExtra.checkCrc) { | ||
if (putExtra.crc32 == null) { | ||
fileBody = Buffer.concat(fileBody); | ||
var bodyCrc32 = parseInt('0x' + getCrc32(fileBody)); | ||
postForm.field('crc32', bodyCrc32); | ||
} else { | ||
postForm.field('crc32', putExtra.crc32); | ||
} | ||
} | ||
}); | ||
@@ -132,0 +138,0 @@ callbackFunc(postForm); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115325
2845