flamerest 1.0.43 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/REST.js +12 -0
- package/package.json +1 -1
package/REST.js
CHANGED
|
@@ -482,7 +482,19 @@ class FLAMEREST {
|
|
|
482
482
|
|
|
483
483
|
// Если в один из параметров передан FileList или input[type=file], т.е. нужно загрузить файлы
|
|
484
484
|
for (let val in values) {
|
|
485
|
+
|
|
485
486
|
// Преобразуем
|
|
487
|
+
if (typeof values[val] === 'object'
|
|
488
|
+
&& values[val].hasOwnProperty('value')
|
|
489
|
+
&& (
|
|
490
|
+
values[val].value instanceof Event ||
|
|
491
|
+
values[val].value instanceof HTMLInputElement ||
|
|
492
|
+
values[val].value instanceof ClipboardEvent ||
|
|
493
|
+
values[val].value instanceof DataTransfer ||
|
|
494
|
+
values[val].value instanceof FileList
|
|
495
|
+
)
|
|
496
|
+
) values[val] = values[val].value;
|
|
497
|
+
|
|
486
498
|
if (values[val] instanceof Event && values[val].target instanceof HTMLInputElement && values[val].target.type === 'file') values[val] = values[val].target.files;
|
|
487
499
|
if (values[val] instanceof HTMLInputElement && values[val].type === 'file') values[val] = values[val].files;
|
|
488
500
|
if (values[val] instanceof ClipboardEvent) values[val] = values[val].clipboardData.files;
|