Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-file-upload-header

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-file-upload-header - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

12

lib/actions.js

@@ -114,10 +114,8 @@ 'use strict';

function uploadFiles(identificator, url, files, type, data) {
var concurrency = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 2;
function uploadFiles(identificator, url, files, type, data, fileAPIOptions) {
return function (params) {
var dispatch = typeof params === 'function' ? params : params.dispatch;
var uploadFilePromise = _promise2.default.map(files, function (file) {
return uploadFile(dispatch, url, identificator, file, data);
}, { concurrency: concurrency });
var allFilePromises = files.map(function (file) {
return uploadFile(dispatch, url, identificator, file, data, fileAPIOptions);
});

@@ -127,3 +125,3 @@ return {

payload: {
promise: uploadFilePromise
promise: _promise2.default.all(allFilePromises)
}

@@ -130,0 +128,0 @@ };

{
"name": "redux-file-upload-header",
"version": "0.0.23",
"version": "0.0.24",
"description": "Redux-friendly file upload made easy",

@@ -66,7 +66,7 @@ "main": "lib/index.js",

"peerDependencies": {
"react": ">=15.5",
"react-dom": ">=15.5",
"react-redux": ">=5.0",
"redux": ">=3.6"
"react": ">=15.5.0",
"react-dom": ">=15.5.0",
"react-redux": ">=5.0.0",
"redux": ">=3.6.0"
}
}

@@ -81,10 +81,6 @@ import isServer from 'detect-node';

export function uploadFiles(identificator, url, files, type, data, concurrency = 2) {
export function uploadFiles(identificator, url, files, type, data, fileAPIOptions) {
return params => {
const dispatch = typeof params === 'function' ? params : params.dispatch;
const uploadFilePromise = Promise.map(
files,
file => uploadFile(dispatch, url, identificator, file, data),
{ concurrency }
);
const allFilePromises = files.map(file => uploadFile(dispatch, url, identificator, file, data, fileAPIOptions));

@@ -94,3 +90,3 @@ return {

payload: {
promise: uploadFilePromise
promise: Promise.all(allFilePromises)
}

@@ -97,0 +93,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc