mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user