rc-upload
Advanced tools
Comparing version 2.9.3 to 2.9.4
@@ -50,2 +50,13 @@ function getError(option, xhr) { | ||
Object.keys(option.data).forEach(function (key) { | ||
var value = option.data[key]; | ||
// support key-value array data | ||
if (Array.isArray(value)) { | ||
value.forEach(function (item) { | ||
// { list: [ 11, 22 ] } | ||
// formData.append('list[]', 11); | ||
formData.append(key + '[]', item); | ||
}); | ||
return; | ||
} | ||
formData.append(key, option.data[key]); | ||
@@ -52,0 +63,0 @@ }); |
@@ -56,2 +56,13 @@ 'use strict'; | ||
Object.keys(option.data).forEach(function (key) { | ||
var value = option.data[key]; | ||
// support key-value array data | ||
if (Array.isArray(value)) { | ||
value.forEach(function (item) { | ||
// { list: [ 11, 22 ] } | ||
// formData.append('list[]', 11); | ||
formData.append(key + '[]', item); | ||
}); | ||
return; | ||
} | ||
formData.append(key, option.data[key]); | ||
@@ -58,0 +69,0 @@ }); |
{ | ||
"name": "rc-upload", | ||
"version": "2.9.3", | ||
"version": "2.9.4", | ||
"description": "upload ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
72157
1783