
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
pure-upload
Advanced tools
The pure JS (TS) upload library with no dependencies compatible with Google Chrome, Firefox, IE10+, Edge and modern mobile browsers.
npm install pure-upload --save
or yarn add pure-upload
.bower install pure-upload
.See a simple example.
Import pure-upload with standard import syntax:
import * as pu from 'pure-upload';
Uploader manages upload queue and registers upload areas.
Initialization:
let uploader = pu.getUploader(uploadQueueOptions, uploadQueueCallbacks)
maxParallelUploads?: number;
parallelBatchOffset?: number;
autoStart?: boolean;
autoRemove?: boolean;
onProgressCallback?: (file: IUploadFile) => void;
onCancelledCallback?: (file: IUploadFile) => void;
onFinishedCallback?: (file: IUploadFile) => void;
onUploadedCallback?: (file: IUploadFile) => void;
onErrorCallback?: (file: IUploadFile) => void;
onUploadStartedCallback?: (file: IUploadFile) => void;
onFileAddedCallback?: (file: IUploadFile) => void;
onFileRemovedCallback?: (file: IUploadFile) => void;
onAllFinishedCallback?: () => void;
onQueueChangedCallback?: (queue: IUploadFile[]) => void;
onFilesAddedErrorCallback?: (files: IUploadFile[]) => void;
Upload area defines element registred in Uploader.
Registration:
let uploadArea = uploader.registerArea(element, uploadAreaOptions);
Unregistration:
uploader.unregisterArea(uploadArea);
url: string;
method: string;
withCredentials?: boolean;
headers?: { [key: string]: string; };
params?: { [key: string]: string; };
localizer?: ILocalizer;
maxFileSize?: number;
allowDragDrop?: boolean | (() => boolean);
clickable?: boolean | (() => boolean);
accept?: string;
multiple?: boolean;
validateExtension?: boolean;
validateMissingExtension?: boolean;
manualStart?: boolean;
allowEmptyFile?: boolean;
dragOverStyle?: string;
dragOverGlobalStyle?: string;
useCapture?: boolean;
onFileAdded?: (file: IUploadFile) => void;
onFileSelected?: (file: IUploadFile) => void;
onFilesSelected?: (file: IUploadFile[]) => void;
onFileError?: (file: IUploadFile) => void;
onFileCanceled?: (file: IUploadFile) => void;
start(autoClear?: boolean, files?: IUploadFile[]): void;
clear(files?: IUploadFile[]): void;
fileSizeInvalid: (maxFileSize: number) => string;
fileTypeInvalid: (accept: string) => string;
invalidResponseFromServer: () => string;
Standard File object extended with additional informations and methods to manage a file in queue.
guid: string;
uploadStatus?: UploadStatus;
responseCode: number;
responseText: string;
progress: number;
sentBytes: number;
errorCode: ErrorCode;
cancel: () => void;
remove: () => void;
start: () => void;
File statuses accesible by pu.uploadStatus
.
Library used by [Quadient](https://quadient.cz/.
MIT, Copyright © 2015 Tomáš Růt
8.0.0
Fix audit findings in dependencies Update TS@4.4.2
FAQs
The pure upload library without dependencies
The npm package pure-upload receives a total of 87 weekly downloads. As such, pure-upload popularity was classified as not popular.
We found that pure-upload demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.