Merge develop

This commit is contained in:
Pieter Vander Vennet 2021-07-27 19:59:41 +02:00
commit 0162d52b68
127 changed files with 6609 additions and 15167 deletions

View file

@ -358,14 +358,13 @@ export class Utils {
/**
* Triggers a 'download file' popup which will download the contents
* @param contents
* @param fileName
*/
public static offerContentsAsDownloadableFile(contents: string | Blob, fileName: string = "download.txt") {
public static offerContentsAsDownloadableFile(contents: string | Blob, fileName: string = "download.txt",
options?: { mimetype: string }) {
const element = document.createElement("a");
let file;
if (typeof (contents) === "string") {
file = new Blob([contents], {type: 'text/plain'});
file = new Blob([contents], {type: options?.mimetype ?? 'text/plain'});
} else {
file = contents;
}