@alfresco/adf-core
Version:
36 lines (35 loc) • 1.2 kB
TypeScript
import * as i0 from "@angular/core";
export declare class DownloadService {
private readonly saveData;
constructor();
/**
* Invokes content download for a Blob with a file name.
*
* @param blob Content to download.
* @param fileName Name of the resulting file.
*/
downloadBlob(blob: Blob, fileName: string): void;
/**
* Invokes content download for a data array with a file name.
*
* @param data Data to download.
* @param fileName Name of the resulting file.
*/
downloadData(data: any, fileName: string): void;
/**
* Invokes content download for a JSON object with a file name.
*
* @param json JSON object to download.
* @param fileName Name of the resulting file.
*/
downloadJSON(json: any, fileName: string): void;
/**
* Invokes the download of the file by its URL address.
*
* @param url Url address pointing to the file.
* @param fileName Name of the file download.
*/
downloadUrl(url: string, fileName: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DownloadService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DownloadService>;
}