Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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 registered 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 accessible by pu.uploadStatus
.
Current gulp build tool requires node v16 or v17.
npm debug-watch
npm run example-watch
node example
npm run build
Library used by Quadient.
MIT, Copyright © 2015 Tomáš Růt
8.4.0
Updated TypeScript to 5.6.3.
FAQs
The pure upload library without dependencies
The npm package pure-upload receives a total of 109 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.