Home

Awesome

ngx-uploadx

Angular Resumable Upload Module

tests build npm version commits since latest release

Key Features

Basic usage

  npm install ngx-uploadx
//...
import { UploadxModule } from 'ngx-uploadx';

@NgModule({
  imports: [
    UploadxModule,
   // ...
});
// Component code
//...
import { UploadxOptions, UploadState } from 'ngx-uploadx';

@Component({
  selector: 'app-home',
  template: ` <input type="file" [uploadx]="options" (state)="onUpload($event)" /> `
})
export class AppHomeComponent {
  options: UploadxOptions = { endpoint: `[URL]` };
  onUpload(state: UploadState) {
    console.log(state);
    //...
  }
}

Please navigate to the src/app sub-folder for more detailed examples.

Server-side setup

API

UploadxOptions

UploadxModule

Adds directives and provide static method withConfig for global configuration (example).

:bulb: No need to import UploadxModule if you do not use the uploadx or uploadxDrop directives in your application.

Directives

<div uploadxDrop>
  <label class="file-drop">
    <input type="file" [uploadx]="options" [control]="control" (state)="onState($event)" />
  </label>
</div>

uploadx

File input directive.

selectors: [uploadx], uploadx

Properties:

uploadxDrop

File drop directive.

selector: uploadxDrop

:bulb: Activates the .uploadx-drop-active class on DnD operations.

UploadxService

DI tokens

Demo

Checkout the Demo App or run it on your local machine:

Build

Run npm run build:pkg to build the lib.

packaged by ng-packagr

Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues.

Contributing

Pull requests are welcome!
To contribute, please read contributing instructions.

License

The MIT License (see the LICENSE file for the full text)