Gathering detailed insights and metrics for lite-uploader
Gathering detailed insights and metrics for lite-uploader
Gathering detailed insights and metrics for lite-uploader
Gathering detailed insights and metrics for lite-uploader
Lightweight file uploader for NodeJS and jQuery with support for drag/drop, basic and custom validators and hooks for all the various events like progress etc
npm install lite-uploader
Typescript
Module System
Node Version
NPM Version
71.4
Supply Chain
99.3
Quality
75.7
Maintenance
100
Vulnerability
100
License
JavaScript (98.97%)
PHP (0.58%)
HTML (0.45%)
Total Downloads
45,946
Last Day
20
Last Week
197
Last Month
757
Last Year
6,800
MIT License
101 Stars
230 Commits
39 Forks
11 Watchers
1 Branches
3 Contributors
Updated on Apr 09, 2025
Minified
Minified + Gzipped
Latest Version
6.0.0
Package Id
lite-uploader@6.0.0
Unpacked Size
33.15 kB
Size
9.34 kB
File Count
8
NPM Version
6.4.1
Node Version
9.11.2
Cumulative downloads
Total Downloads
Last Day
-48.7%
20
Compared to previous day
Last Week
-3.9%
197
Compared to previous week
Last Month
2.2%
757
Compared to previous month
Last Year
-33.9%
6,800
Compared to previous year
This is a lightweight library for NodeJS and jQuery, aiming to make uploading files a doddle. With some useful options including basic validation, it is a good choice for any developer who is not so worried about supporting legacy browsers.
npm install lite-uploader --save
<script src="./src/liteuploader.js"></script>
jQuery is supported but is optional
Name | Type | Default | Description |
---|---|---|---|
url | String or Function (required) | null | url that will handle the upload, or a function that resolves with the url |
ref | String (required) | null | the request argument name for the file form data. Will fallback to the name property of the file input field if not supplied. |
method | String | POST | allows overriding of the default HTTP request method if necessary |
rules | Object | {} | object where you can specify validation rules for the files to be uploaded - current supported rules are:
|
params | Object | {} | object of params to be sent to the server in addition to the files being uploaded |
headers | Object | {} | object of headers to be sent to the server |
validators | Array | [] | an array of functions that can take a File and return a validation result on it, see examples for usage |
singleFileUploads | Boolean | false | set to true to upload each file of a selection using an individual request |
withCredentials | Boolean | false | indicates whether requests should be made using credentials such as cookies |
beforeRequest | Function | null | delay the file upload request by returning a promise. Recieves the Files and the FormData. Expected to resolve with the FormData to continue. Reject to stop upload. |
sendAsFormData | Boolean | true | when set to false and singleFileUploads is true, dont send the file payload as form data. Also any params added via 'addParam' to form data, will be ignored |
Name | Parameters | Description |
---|---|---|
lu:errors | eventName, {errors} | triggered when errors are found, including built-in and custom validators - see 'Error Types' section for more |
lu:start | eventName, {files} | triggered before any uploading starts |
lu:finish | eventName | triggered when all uploading has finished |
lu:before | eventName, {files} | triggered before each request to the server |
lu:progress | eventName, {files, percentage} | triggered whilst uploading files |
lu:success | eventName, {files, response} | triggered on a successful request to the server |
lu:fail | eventName, {xhr} | triggered on a failed request to the server |
lu:cancelled | eventName | triggered on upload abort |
Below is an overview of the built-in error types that can be returned when validating files
Starts the upload
Name | Type | Default | Description |
---|---|---|---|
files | FileList (optional) | null | a list of files to be uploaded, takes priority over default mechanism if supplied |
Allows parameters to be added after plugin instantiation
Name | Type | Default | Description |
---|---|---|---|
key | String (required) | n/a | name of parameter to be added |
value | String (required) | n/a | value of parameter to be added |
Allows the upload to be cancelled, triggers lu:cancelled
Name | Type | Default | Description |
---|---|---|---|
No parameters |
Licensed under the MIT License.
View the full license here.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-19
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More