rc-upload
Advanced tools
Comparing version 2.3.7 to 2.3.8
@@ -231,9 +231,12 @@ import _defineProperty from 'babel-runtime/helpers/defineProperty'; | ||
} | ||
var inputs = []; | ||
var inputs = document.createDocumentFragment(); | ||
for (var key in data) { | ||
if (data.hasOwnProperty(key)) { | ||
inputs.push('<input name="' + key + '" value="' + data[key] + '"/>'); | ||
var input = document.createElement('input'); | ||
input.setAttribute('name', key); | ||
input.value = data[key]; | ||
inputs.appendChild(input); | ||
} | ||
} | ||
dataSpan.innerHTML = inputs.join(''); | ||
dataSpan.appendChild(inputs); | ||
formNode.submit(); | ||
@@ -240,0 +243,0 @@ dataSpan.innerHTML = ''; |
@@ -45,3 +45,3 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
value: function getComponent() { | ||
return typeof FormData !== 'undefined' ? AjaxUpload : IframeUpload; | ||
return typeof File !== 'undefined' ? AjaxUpload : IframeUpload; | ||
} | ||
@@ -48,0 +48,0 @@ }, { |
# History | ||
---- | ||
### 2.3.8 / 2017-06-21 | ||
- fix issue #80 & #81 [#82](https://github.com/react-component/upload/pull/82) | ||
### 2.3.5 / 2017-05-01 | ||
@@ -5,0 +9,0 @@ |
@@ -274,9 +274,12 @@ 'use strict'; | ||
} | ||
var inputs = []; | ||
var inputs = document.createDocumentFragment(); | ||
for (var key in data) { | ||
if (data.hasOwnProperty(key)) { | ||
inputs.push('<input name="' + key + '" value="' + data[key] + '"/>'); | ||
var input = document.createElement('input'); | ||
input.setAttribute('name', key); | ||
input.value = data[key]; | ||
inputs.appendChild(input); | ||
} | ||
} | ||
dataSpan.innerHTML = inputs.join(''); | ||
dataSpan.appendChild(inputs); | ||
formNode.submit(); | ||
@@ -283,0 +286,0 @@ dataSpan.innerHTML = ''; |
@@ -79,3 +79,3 @@ 'use strict'; | ||
value: function getComponent() { | ||
return typeof FormData !== 'undefined' ? _AjaxUploader2['default'] : _IframeUploader2['default']; | ||
return typeof File !== 'undefined' ? _AjaxUploader2['default'] : _IframeUploader2['default']; | ||
} | ||
@@ -82,0 +82,0 @@ }, { |
{ | ||
"name": "rc-upload", | ||
"version": "2.3.7", | ||
"version": "2.3.8", | ||
"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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
57489
1443
0