# rt-upload-files

> Angular 14 component for uploading files

Latest version **1.0.13** (published 2023-06-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install rt-upload-files
pnpm add rt-upload-files
yarn add rt-upload-files
bun add rt-upload-files
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2023-06-19 |
| First published | 2022-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 31.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | A.A. Podolian |
| Maintainers | andriypodolian, andriy_podolian |
| Keywords | upload, uploads, drag and drop |

## Links

- npm: https://www.npmjs.com/package/rt-upload-files
- Repository: https://github.com/Andriypodolian/rt-upload-files
- Homepage: https://github.com/Andriypodolian/rt-upload-files#readme
- Issues: git+https://github.com/Andriypodolian/rt-upload-files/issues
- npm.io page: https://npm.io/package/rt-upload-files

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.5.3
- [ngx-file-drop](https://npm.io/package/ngx-file-drop.md) ^14.0.2

## Recent versions

- 1.0.13 (latest) — 2023-06-19
- 1.0.12 — 2022-09-23
- 1.0.11 — 2022-09-23
- 1.0.10 — 2022-09-23
- 1.0.9 — 2022-09-23
- 1.0.8 — 2022-09-19
- 1.0.7 — 2022-09-14
- 1.0.6 — 2022-08-30
- 1.0.5 — 2022-08-30
- 1.0.4 — 2022-08-30
- 1.0.3 — 2022-08-30
- 1.0.2 — 2022-08-30
- 1.0.1 — 2022-08-29
- 1.0.0 — 2022-08-29

## README

## RT upload file

Module for uploading files to the server, error handling, download process

### Api

| Name          | Type            | Default |
|---------------|-----------------|---------|
| [disabled]    | boolean         | false   |
| [progress]    | number          | 0       |
| [errorServer] | FileUploadError | null    |
| [formats]     | FormatsFile[ ]  | [ ]     |
| [isUploaded]  | boolean         | false   |
| (outFile)     | File            |
| (removeFile)  | null            | null    |    

## exemple

exemple.component.html

```html

<rt-upload-file
        [disabled]="false"
        [progress]="proccessUploading$ | async"
        [errorServer]="errorUploading"
        [formats]="formatsFile"
        [isUploaded]="isUploaded"
        (outFile)="onFile($event)">
</rt-upload-file>
```

exemple.component.ts

```ts

import {Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef} from '@angular/core';
import {Observable} from "rxjs";

@Component({
    selector: 'app-example-component',
    templateUrl: './example.component.html',
    styleUrls: ['./example.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush,
})

export class ExampleComponent implements OnInit {
    /** Procentage uploading file from server */
    proccessUploading$: Observable<number>;
    /** Error uploading from server */
    errorUploading: FileUploadError = null;
    /** Formats for uploading file */
    formatsFile: FormatsFile[] = [FormatsFile.pdf, FormatsFile.docx];
    /** State uploaded file */
    isUploaded = false;

    constructor(cd: ChangeDetectorRef) {
    }

    onFile(file: File) {

        this.isUploaded = false;

        /**
         * proccessUploading$: observable<number> 0.. 100
         * */

    }
}
```
https://www.regulus.team/

---
_Source: https://npm.io/package/rt-upload-files · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
