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

@uppy/file-input

Package Overview
Dependencies
Maintainers
6
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/file-input - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

24

lib/FileInput.js

@@ -5,3 +5,3 @@ import { UIPlugin } from '@uppy/core';

const packageJson = {
"version": "3.0.2"
"version": "3.0.3"
};

@@ -15,4 +15,5 @@ import locale from './locale.js';

this.type = 'acquirer';
this.defaultLocale = locale; // Default options, must be kept in sync with @uppy/react/src/FileInput.js.
this.defaultLocale = locale;
// Default options, must be kept in sync with @uppy/react/src/FileInput.js.
const defaultOptions = {

@@ -22,5 +23,7 @@ target: null,

inputName: 'files[]'
}; // Merge default options with the ones set by user
};
this.opts = { ...defaultOptions,
// Merge default options with the ones set by user
this.opts = {
...defaultOptions,
...opts

@@ -33,3 +36,2 @@ };

}
addFiles(files) {

@@ -42,3 +44,2 @@ const descriptors = files.map(file => ({

}));
try {

@@ -50,7 +51,8 @@ this.uppy.addFiles(descriptors);

}
handleInputChange(event) {
this.uppy.log('[FileInput] Something selected through input...');
const files = toArray(event.target.files);
this.addFiles(files); // We clear the input after a file is selected, because otherwise
this.addFiles(files);
// We clear the input after a file is selected, because otherwise
// change event is not fired in Chrome and Safari when a file

@@ -61,3 +63,2 @@ // with the same name is selected.

// Chrome will not trigger change if we drop the same file twice (Issue #768).
event.target.value = null; // eslint-disable-line no-param-reassign

@@ -69,3 +70,2 @@ }

}
render() {

@@ -104,3 +104,2 @@ /* http://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/ */

}
install() {

@@ -110,3 +109,2 @@ const {

} = this.opts;
if (target) {

@@ -116,8 +114,6 @@ this.mount(target, this);

}
uninstall() {
this.unmount();
}
}
FileInput.VERSION = packageJson.version;
{
"name": "@uppy/file-input",
"description": "Simple UI of a file input button that works with Uppy right out of the box",
"version": "3.0.2",
"version": "3.0.3",
"license": "MIT",

@@ -26,8 +26,8 @@ "main": "lib/index.js",

"dependencies": {
"@uppy/utils": "^5.3.0",
"@uppy/utils": "^5.4.3",
"preact": "^10.5.13"
},
"peerDependencies": {
"@uppy/core": "^3.2.0"
"@uppy/core": "^3.4.0"
}
}

@@ -1,5 +0,5 @@

import type { PluginOptions, UIPlugin, PluginTarget } from '@uppy/core'
import type { PluginTarget, UIPlugin, UIPluginOptions } from '@uppy/core'
import FileInputLocale from './generatedLocale'
export interface FileInputOptions extends PluginOptions {
export interface FileInputOptions extends UIPluginOptions {
target?: PluginTarget

@@ -6,0 +6,0 @@ pretty?: boolean

Sorry, the diff of this file is not supported yet

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