@uppy/file-input
Version:
Simple UI of a file input button that works with Uppy right out of the box
28 lines • 953 B
TypeScript
import { type ComponentChild } from 'preact';
import { UIPlugin } from '@uppy/core';
import type { Uppy, UIPluginOptions, Body, Meta, DefinePluginOpts } from '@uppy/core';
export interface FileInputOptions extends UIPluginOptions {
pretty?: boolean;
inputName?: string;
}
declare const defaultOptions: {
pretty: boolean;
inputName: string;
};
interface HTMLFileInputElement extends HTMLInputElement {
files: FileList;
}
type Opts = DefinePluginOpts<FileInputOptions, keyof typeof defaultOptions>;
export default class FileInput<M extends Meta, B extends Body> extends UIPlugin<Opts, M, B> {
static VERSION: any;
input: HTMLFileInputElement | null;
constructor(uppy: Uppy<M, B>, opts?: FileInputOptions);
addFiles(files: File[]): void;
private handleInputChange;
private handleClick;
render(): ComponentChild;
install(): void;
uninstall(): void;
}
export {};
//# sourceMappingURL=FileInput.d.ts.map