remove rocket chat

This commit is contained in:
Peter Maquiran
2024-08-09 10:50:32 +01:00
parent 45e829bec3
commit 6cbd8d903c
67 changed files with 962 additions and 5618 deletions
@@ -0,0 +1,26 @@
import { Injectable } from '@angular/core';
import { FileType } from 'src/app/models/fileType';
@Injectable({
providedIn: 'root'
})
export class FilePickerWebService {
constructor() { }
getFileFromDevice(types: typeof FileType[]): Promise<File> {
let input = document.createElement('input');
input.type = 'file';
input.accept = types.join(', ')
input.click();
return new Promise((resolve, reject)=>{
input.onchange = async () => {
const file = Array.from(input.files)
resolve(file[0] as File);
};
})
}
}