dynamic-display-shared
Version:
A library for dynamic view
46 lines (45 loc) • 1.93 kB
TypeScript
import { OnDestroy } from '@angular/core';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { OAuthService } from 'angular-oauth2-oidc';
import { AzurestorageService } from './azure-storage.service';
import { ApiBaseService } from '../../infrastructure/data/api-base.service';
import { Logger } from '../../infrastructure/logger';
import { UploadFileData } from '../services/update-entity.service';
import * as i0 from "@angular/core";
export declare class StorageService extends ApiBaseService implements OnDestroy {
protected http: HttpClient;
protected logger: Logger;
protected oauthService: OAuthService;
private blobService;
protected env: any;
uploadConfig: UploadConfig;
percent: number;
currentFileName: string;
private subscriptions;
constructor(http: HttpClient, logger: Logger, oauthService: OAuthService, blobService: AzurestorageService, env: any);
ngOnDestroy(): void;
getSAS(fileName: string): Observable<string>;
getReadSASTokenURL(fileName: string): Observable<string>;
UploadFilesData(uploadFilesData: UploadFileData[]): Observable<boolean>;
uploadFileByToken(file: File, fileName: string, mimeType: string): Observable<boolean>;
getSasTokenWrite(file: string): Observable<string>;
uploadFile(file: File, token: string, fileName?: string): Observable<boolean>;
saveFileError(error: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<StorageService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<StorageService>;
}
export declare class UploadParams {
sas: string;
storageAccount: string;
containerName: string;
}
export declare class UploadConfig {
baseUrl: string;
blockSize: number;
sasToken: string;
file: File;
complete: () => void;
error: (err: any) => void;
progress: (percent: any) => void;
}