Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
pure-upload
Advanced tools
The pure JS (TS) upload library with no dependencies compatible with Google Chrome, Firefox, IE10+ (IE9- with auto-start by default, manual-start optionally) and mobile browsers.
npm install pure-upload --save
.bower install pure-upload
.See a simple example.
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);
Registration for IE9- with manual-start:
let uploadArea = uploader.registerArea(element, uploadAreaOptions, compatibilityForm);
The compatibilityForm objects has to be form element containing one input element for file and one input element for submit.
Unregistration:
uploader.unregisterArea(uploadArea);
url: string;
method: string;
withCredentials?: boolean;
headers?: { [key: string]: string; };
params?: { [key: string]: string; };
maxFileSize?: number;
allowDragDrop?: boolean;
clickable?: boolean;
accept?: string;
multiple?: boolean;
onFileAdded?: (file: IUploadFile) => void;
onFileError?: (file: IUploadFile) => void;
onFileCancelled?: (file: IUploadFile) => void;
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;
cancel: () => void;
remove: () => void;
start: () => void;
File statuses accesible by pu.uploadStatus
.
Library used by GMC Software Technology.
MIT, Copyright © 2015 Tomáš Růt
2.1.0
Added offset for batches limited by max uploading file count.
FAQs
The pure upload library without dependencies
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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.