1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- /// <reference path="typings/esdk-obs-browser.d.ts" />
- import ObsClient from "esdk-obs-browserjs";
- import Parse from "parse";
- import * as i0 from "@angular/core";
- /**
- * HwobsDir 华为OBS目录接口
- * @public
- */
- export interface HwobsDir {
- Prefix: string;
- }
- /**
- * HwobsDir 华为OBS文件接口
- * @public
- */
- export interface HwobsFile {
- ETag: "\"f0ec968fe51ab48348307e06476122eb\"";
- Key: string;
- LastModified: string;
- Owner: object;
- Size: string;
- StorageClass: string;
- }
- /**
- * HwobsService 华为OBS文件服务
- * @public
- */
- export declare class HwobsService {
- obsClient: ObsClient;
- bucketName: string;
- host: string;
- constructor();
- /**
- * 目录及检索相关函数
- */
- listDir(prefix: any): Promise<{
- dirs: Array<HwobsDir>;
- files: Array<HwobsFile>;
- }>;
- /**
- * 文件上传相关函数
- * @param file
- * @param key
- * @returns
- */
- uploadFile(file: File, key: string): Promise<Parse.Object>;
- Attachment: any;
- checkFileExists(file: any): Promise<Parse.Object>;
- saveAttachment(file: File, key: string): Promise<Parse.Object<Parse.Attributes>>;
- getFileHash(file: File): Promise<unknown>;
- static ɵfac: i0.ɵɵFactoryDeclaration<HwobsService, never>;
- static ɵprov: i0.ɵɵInjectableDeclaration<HwobsService>;
- }
|