1.0.13 • Published 11 months ago

rt-upload-files v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

RT upload file

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

Api

NameTypeDefault
disabledbooleanfalse
progressnumber0
errorServerFileUploadErrornull
formatsFormatsFile
isUploadedbooleanfalse
(outFile)File
(removeFile)nullnull

exemple

exemple.component.html

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

exemple.component.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/

1.0.13

11 months ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago