This commit is contained in:
tiago.kayaya
2021-10-08 15:37:24 +01:00
parent 5d1f0d2705
commit af29c4ea82
8 changed files with 105 additions and 27 deletions
+5 -3
View File
@@ -17,21 +17,23 @@ export class FileLoaderService {
createInput({accept, type = 'file'}:createInput): HTMLInputElement {
let input = document.createElement('input');
input.type = type || 'file';
input.accept = accept.join(', ')
// input.onchange = () => {
// // you can use this method to get file and perform respective operations
// let files = Array.from(input.files);
// console.log(files);
// };
input.click();
return input
}
getFirstFile(input: HTMLInputElement) {