1.0.13 • Published 2 years ago

rt-upload-files v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago