import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { FileStorageConfiguration, FileStorageFormData, FileStoragePresignedPostToken, FileStorageUploadResult } from '../interfaces'; import * as i0 from "@angular/core"; export declare class FileStorageService { private fileStorageConfiguration; private http; constructor(fileStorageConfiguration: FileStorageConfiguration, http: HttpClient); /** * Get presigned upload url to upload a file into storage * * @param mimeType - MIME type of the file to upload * @param fileSize - Size of the file to upload * @returns Observable that resolve into a presigned post token */ getPresignedUploadUrl(mimeType: string, fileSize: number): Observable; /** * Get presigned download url to download a file to storage * * @param file - Path of the file to download * @returns Observable that resolve into a presigned post token */ getPresignedDownloadUrl(file: string): Observable<{ url: string; }>; /** * Generate form data from presigned post token and file * to upload * * @param presignedPostToken - Presigned post token to build form data * @param file - File to upload * @returns Form data instance that must be sent to data storage */ generateFormData(rawFormData: FileStorageFormData, file: File): FormData; /** * Upload a file to file storage using presigned url * * @param file - File to upload to file storage * @param reportProgress - Option to report request progress * @returns Observable that resolves as a temporary url of the uploaded file */ uploadFileToFileStorage(file: File, reportProgress?: boolean): Observable; /** * Return the url of an uploaded file, calculated from the upload url * and the file key * * @param postURL - Upload url of the file * @param fileKey - Key of the uploaded file * @returns the public url of the uploaded file */ getUploadFileUrl(postURL: string, fileKey: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }