Skip to content

Commit 8442eaf

Browse files
committed
fix the mime error after updating the library
1 parent 24c9ce1 commit 8442eaf

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## CHANGE LOG
22

3+
## v7.7.7
4+
- 修复form上传在升级mime库后的错误
5+
36
## v7.1.6
47
- 修复rs和rsf的https默认域名
58
- 升级修复mime库的安全风险

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "qiniu",
3-
"version": "7.1.6",
3+
"version": "7.1.7",
44
"description": "Node wrapper for Qiniu Resource (Cloud) Storage API",
55
"main": "index.js",
66
"directories": {

qiniu/storage/form.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ FormUploader.prototype.putFile = function(uploadToken, key, localFile, putExtra,
173173
var fsStream = fs.createReadStream(localFile);
174174

175175
if (!putExtra.mimeType) {
176-
putExtra.mimeType = mime.lookup(localFile);
176+
putExtra.mimeType = mime.getType(localFile);
177177
}
178178

179179
if (!putExtra.fname) {

0 commit comments

Comments
 (0)