额,参数解析问题修复
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yizhi-multipart-reader",
|
"name": "yizhi-multipart-reader",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "typing/index.d.ts",
|
"types": "typing/index.d.ts",
|
||||||
|
@ -286,7 +286,7 @@ export class MultipartReader {
|
|||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
const matchItem = item.match(/^([\s\S]+?)=([\s\S]+?)$/)
|
const matchItem = item.match(/^([\s\S]+?)=([\s\S]+?)$/)
|
||||||
if (!matchItem) return
|
if (!matchItem) return
|
||||||
let [k, v] = matchItem.map(s => s.trim())
|
let [_, k, v] = matchItem.map(s => s.trim())
|
||||||
k = k.toLowerCase()
|
k = k.toLowerCase()
|
||||||
//去除引号
|
//去除引号
|
||||||
if (v[0] == '"' && v[v.length - 1] == '"') v = v.substring(1, v.length - 1)
|
if (v[0] == '"' && v[v.length - 1] == '"') v = v.substring(1, v.length - 1)
|
||||||
|
Reference in New Issue
Block a user