Installations
npm install @iplab/ngx-file-upload
Releases
Unable to fetch releases
Contributors
Developer
pIvan
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
No
Node Version
20.9.0
NPM Version
10.9.0
Statistics
87 Stars
123 Commits
12 Forks
5 Watching
11 Branches
2 Contributors
Updated on 28 Nov 2024
Bundle Size
96.95 kB
Minified
19.06 kB
Minified + Gzipped
Languages
TypeScript (68.29%)
HTML (26.2%)
SCSS (3.96%)
JavaScript (1.17%)
CSS (0.38%)
Total Downloads
Cumulative downloads
Total Downloads
1,251,849
Last day
15%
1,373
Compared to previous day
Last week
3.9%
6,607
Compared to previous week
Last month
5.3%
27,675
Compared to previous month
Last year
10%
312,472
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Peer Dependencies
5
@iplab/ngx-file-upload
Angular module used for file upload.
Demo
more detailed instructions can be found here
Tested with
- Firefox (latest)
- Chrome (latest)
- Chromium (latest)
- Edge
Compatible with
- Angular 17 (@iplab/ngx-file-upload@version >= 17.0.0)
- Angular 16 (@iplab/ngx-file-upload@version >= 16.0.0)
- Angular 15 (@iplab/ngx-file-upload@version >= 15.0.0)
- Angular 14 (@iplab/ngx-file-upload@version >= 14.0.0)
- Angular 13 (@iplab/ngx-file-upload@version >= 13.0.0)
- Angular 12 (@iplab/ngx-file-upload@version >= 12.0.0)
- Angular 11 (@iplab/ngx-file-upload@version >= 11.0.0)
1with older version of Angular use @iplab/ngx-file-upload@version < 4.0.0
Installing / Getting started
1npm install @iplab/ngx-file-upload
Use the following snippet inside your app module:
1import { ReactiveFormsModule, FormsModule } from '@angular/forms'; 2import { FileUploadModule } from '@iplab/ngx-file-upload'; 3import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 4... 5... 6 7@NgModule({ 8 imports: [ 9 BrowserModule, 10 ReactiveFormsModule, 11 FormsModule, 12 FileUploadModule, 13 BrowserAnimationsModule // or use NoopAnimationsModule 14 ], 15 bootstrap: [AppComponent] 16}) 17export class AppModule {}
Use the following snippet inside your component:
1import { FileUploadControl, FileUploadValidators } from '@iplab/ngx-file-upload'; 2 3 4@Component({ 5 selector: `app-root`, 6 template: `<file-upload [control]="fileUploadControl"></file-upload>` 7}) 8export class AppComponent { 9 10 public fileUploadControl = new FileUploadControl(null, FileUploadValidators.filesLimit(2)); 11 12 constructor() { 13 } 14}
With angular reactive form you can use the following snippet:
1import { FileUploadValidators } from '@iplab/ngx-file-upload'; 2 3 4@Component({ 5 selector: `app-root`, 6 template: ` 7 <form [formGroup]="demoForm"> 8 <file-upload formControlName="files"></file-upload> 9 </form>` 10}) 11export class AppComponent { 12 13 private filesControl = new FormControl(null, FileUploadValidators.filesLimit(2)); 14 15 public demoForm = new FormGroup({ 16 files: this.filesControl 17 }); 18 19 constructor() { 20 } 21}
With angular template driven form you can use the following snippet:
1@Component({ 2 selector: `app-root`, 3 template: ` 4 <form #demoForm="ngForm"> 5 <file-upload [(ngModel)]="uploadedFiles" name="files" fileslimit="2"></file-upload> 6 </form>` 7}) 8export class AppComponent { 9 10 public uploadedFiles: Array<File> = []; 11}
Developing
Built With:
- Angular
- RxJS
Setting up Dev
This project was generated with Angular CLI version 16.0.0.
Angular CLI must be installed before building @iplab/ngx-file-upload project.
1npm install -g @angular/cli
1git clone https://github.com/pIvan/file-upload.git 2cd file-upload/ 3npm install 4npm run start
Open "http://localhost:4200" in browser
Versioning
We use SemVer for versioning. For the versions available, see the link to tags on this repository.
Tests
This project was generated with Angular CLI version 16.0.0.
Angular CLI must be installed before testing @iplab/ngx-file-upload project.
1npm install -g @angular/cli
1git clone https://github.com/pIvan/file-upload.git 2cd file-upload/ 3npm install 4npm run test
Contributing
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our contributing guide and then check out one of our issues.
Licensing
@iplab/ngx-file-upload is freely distributable under the terms of the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3.2
/10
Last Scanned on 2024-11-18
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