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

@drawbotics/file-uploader

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@drawbotics/file-uploader - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

14

lib/components/FileUploader.js

@@ -17,3 +17,2 @@ import "core-js/modules/es6.array.from";

import "core-js/modules/es6.string.iterator";
import "core-js/modules/es6.function.name";
import "core-js/modules/es6.array.map";

@@ -105,3 +104,3 @@ import "regenerator-runtime/runtime";

var files, _this$props2, onInit, onComplete, sanitize, promises;
var files, _this$props2, onInit, onComplete, promises;

@@ -113,10 +112,5 @@ return regeneratorRuntime.wrap(function _callee$(_context) {

files = e.target.files;
_this$props2 = this.props, onInit = _this$props2.onInit, onComplete = _this$props2.onComplete, sanitize = _this$props2.sanitize;
_this$props2 = this.props, onInit = _this$props2.onInit, onComplete = _this$props2.onComplete;
onInit ? onInit() : null;
promises = _toConsumableArray(files).map(function (file) {
var sanitizedName = sanitize ? sanitize(file.name, sanitizeFilename) : sanitizeFilename(file.name);
var data = new FormData();
data.append('file', file, sanitizedName);
return data.get('file');
}).map(function (file) {
return _this2._uploadFile(file);

@@ -160,3 +154,5 @@ });

_context2.next = 7;
return parseFile(file);
return parseFile(file, function (name) {
return sanitize ? sanitize(name, sanitizeFilename) : sanitizeFilename(name);
});

@@ -163,0 +159,0 @@ case 7:

@@ -78,3 +78,3 @@ import "core-js/modules/es6.array.iterator";

}
export function parseFile(_x2) {
export function parseFile(_x2, _x3) {
return _parseFile.apply(this, arguments);

@@ -86,3 +86,3 @@ }

/*#__PURE__*/
regeneratorRuntime.mark(function _callee2(file) {
regeneratorRuntime.mark(function _callee2(file, sanitize) {
return regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -92,3 +92,3 @@ while (1) {

case 0:
_context2.t0 = file.name;
_context2.t0 = sanitize(file.name);
_context2.t1 = file.size;

@@ -120,3 +120,3 @@ _context2.t2 = btoa;

export function request(_x3, _x4, _x5) {
export function request(_x4, _x5, _x6) {
return _request.apply(this, arguments);

@@ -180,3 +180,3 @@ }

export function signBlob(_x6, _x7) {
export function signBlob(_x7, _x8) {
return _signBlob.apply(this, arguments);

@@ -215,3 +215,3 @@ }

export function directUpload(_x8, _x9, _x10) {
export function directUpload(_x9, _x10, _x11) {
return _directUpload.apply(this, arguments);

@@ -218,0 +218,0 @@ }

{
"name": "@drawbotics/file-uploader",
"version": "1.1.5",
"version": "1.1.6",
"description": "Small React component to upload files using active storage",

@@ -18,3 +18,3 @@ "license": "UNLICENSED",

"prepublishOnly": "npm run build",
"example": "npx rdw serve --port 4000 docs/example.mdx"
"example": "npx rdw serve --port 4001 docs/example.mdx"
},

@@ -21,0 +21,0 @@ "peerDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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