Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@iplab/ngx-file-upload

pIvan43.1kMIT21.0.0TypeScript support: included

Angular module used for file upload.

file-upload, drag & drop, drag and drop, file upload, forms, angular, ng-rxjs, rxjs, angular form, JavaScript, TypeScript

readme

@iplab/ngx-file-upload

Angular module used for file upload.

npm version Build Status

Demo

more detailed instructions can be found here

Tested with

  • Firefox (latest)
  • Chrome (latest)
  • Chromium (latest)
  • Edge

Compatible with

  • Angular 20 (@iplab/ngx-file-upload@version >= 20.0.0)
  • Angular 19 (@iplab/ngx-file-upload@version >= 19.0.0)
  • Angular 18 (@iplab/ngx-file-upload@version >= 18.0.0)
  • 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)
    with older version of Angular use @iplab/ngx-file-upload@version < 4.0.0

Installing / Getting started

npm install @iplab/ngx-file-upload

Use the following snippet inside your app module:

import { ReactiveFormsModule, FormsModule  } from '@angular/forms';
import { FileUploadModule } from '@iplab/ngx-file-upload';
...
...

@NgModule({
    imports: [
        BrowserModule,
        ReactiveFormsModule,
        FormsModule,
        FileUploadModule,
    ],
    bootstrap: [AppComponent]
})
export class AppModule {}

Use the following snippet inside your component:

import { FileUploadControl, FileUploadValidators } from '@iplab/ngx-file-upload';


@Component({
    selector: `app-root`,
    template: `<file-upload [control]="fileUploadControl"></file-upload>`
})
export class AppComponent {

    public fileUploadControl = new FileUploadControl(null, FileUploadValidators.filesLimit(2));

    constructor() {
    }
}

With angular reactive form you can use the following snippet:

import { FileUploadValidators } from '@iplab/ngx-file-upload';


@Component({
    selector: `app-root`,
    template: `
    <form [formGroup]="demoForm">
        <file-upload formControlName="files"></file-upload>
    </form>`
})
export class AppComponent {

    private filesControl = new FormControl(null, FileUploadValidators.filesLimit(2));

    public demoForm = new FormGroup({
        files: this.filesControl
    });

    constructor() {
    }
}

With angular template driven form you can use the following snippet:

@Component({
    selector: `app-root`,
    template: `
    <form #demoForm="ngForm">
        <file-upload [(ngModel)]="uploadedFiles" name="files" fileslimit="2"></file-upload>
    </form>`
})
export class AppComponent {

    public uploadedFiles: Array<File> = [];
}

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.

npm install -g @angular/cli
git clone https://github.com/pIvan/file-upload.git
cd file-upload/
npm install
npm 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.

npm install -g @angular/cli
git clone https://github.com/pIvan/file-upload.git
cd file-upload/
npm install
npm 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.

changelog

20.0.1 (2025-11-12)

Support

  • angular animation - Removed the dependency on the Angular animations module — animations are now optional and can be used without importing BrowserAnimationsModule or NoopAnimationsModule, as they are purely CSS-based animations.

20.0.0 (2025-07-11)

Support

  • angular update - build and version update

19.0.3 (2025-06-29)

Bug Fix

  • input error type - file-upload-list-item input error fixed

19.0.1 (2024-11-28)

Bug Fix

  • isMultiple property access - Property 'isMultiple' is protected and only accessible within class 'FileUploadAbstract' fixed

19.0.0 (2024-11-26)

Support

  • angular update - build and version update

18.1.1 (2024-11-28)

Bug Fix

  • isMultiple property access - Property 'isMultiple' is protected and only accessible within class 'FileUploadAbstract' fixed

18.1.0 (2024-11-26)

Bug Fix

  • Value changes - preventing valueChanges event emit on model->view update

    Features

  • signals - New signals implemented

18.0.0 (2024-06-12)

Support

  • angular update - build and version update

17.1.0 (2024-03-14)

Features

  • control flow - New control flow implemented
  • standalone components - All components are now standalone
  • DEMO update - Updated to standalone-oriented application

17.0.0 (2023-11-19)

Support

  • angular update - build and version update

16.0.2 (2023-08-24)

Bug Fix

  • SimpleFileUpload component - issue #80 - the problem with the "multiple" file upload
  • File deletion. - issue #77 - The issue with the method call of removeFile() without passing the file has been fixed

16.0.1 (2023-05-16)

Bug Fix

  • FileUploadConfiguration multipe - the problem with the "multiple" flag in configuration has been fixed

16.0.0 (2023-05-13)

Support

  • angular update - build and version update

15.0.0 (2022-11-21)

Support

  • angular update - build and version update

14.0.0 (2022-06-15)

Support

  • angular update - build and version update

13.0.0 (2022-06-08)

Support

  • angular update - version synced with the angular

4.0.0 (2022-02-08)

Support

  • angular update - Dependency update - angular 13 support

3.3.3 (2021-12-01)

Bug Fixes

  • max file size limit - Validation aggregates the total size of files added when multiple files upload is enabled

3.2.0 (2021-05-26)

Features

  • angular update - Dependency update

3.1.0 (2021-03-06)

Features

  • discard - Added support for invalid files discard

2.0.7 (2020-07-22)

Bug Fixes

  • angular 10 support - Support for angular 10

Features

  • template localization - Added support for built-in template localization

2.0.4 (2020-05-27)

Bug Fixes

  • file deletion - Fixed error with preventing files deletion when control is disabled

2.0.0 (2020-02-26)

Features

  • angular update - Dependency update

1.5.0 (2020-01-30)

Features

  • multiple atribute - Multiple attribute is possible to change over file-upload[multiple] or over control

1.3.3 (2019-06-13)

Features

  • angular update - Dependency update

1.3.0 (2019-04-29)

Features

  • animation disabling - Support for animation disabling over component attribute

1.2.2 (2019-04-01)

Features

  • native accept support - Suport for native accept attribute added, it can be used as attribute or method on FileUploadControl

1.2.0 (2019-03-06)

Features

  • native events - Native click, blur and focus events can be called over FileUploadControl
  • simple file upload - New Component - layout similar to native browser input[type="file"]

1.1.10 (2019-02-28)

Bug Fixes

  • FormData is not defined - Fixed error with undefined FormData when creating a project with Angular Universal.

1.1.8 (2019-01-17)

Bug Fixes

  • Error on multiple files validation - Fixed error on multiple files validation caused by RegExp g modifier which save states between calling test, exec etc.

1.1.7 (2019-01-08)

Bug Fixes

  • ERROR in @iplab/ngx-file-upload/animations/insert.animation.d.ts(1,45): error TS1005: ',' expected. - Fixed error with implicitly inherited interface which caused compiler error on older Angular versions

1.1.5 (2019-01-04)

Bug Fixes

  • BrowserModule has already been loaded error - BrowserAnimationsModule is excluded from the library

1.1.4 (2018-12-28)

Features

  • list append and file drop animation

Bug Fixes

  • validation and value change event execution order

1.1.3 (2018-12-18)

Bug Fixes

  • value clearing in combination with Reactive and Template-driven forms

1.1.1 (2018-09-10)

Features

  • minSize="0" max="6200":
  • FileUploadValidators.sizeRange({ minSize?, maxSize? }): support for template and reactive form range file size validation

1.1.0 (2018-08-05)

Features

  • file-drop-zone attribute: use any block element as dropzone

1.0.2 (2018-07-21)

Bug Fixes

  • FileUploadControl.setValue: fixed problem with multiple value change event when multiple files are uploaded

1.0.0 (2018-07-16)

Initial release