|
|
@ -358,13 +358,13 @@ export class FileSystem
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static ChooseFile({ filter, multiple = false, callback }: { filter?: string; multiple?: boolean; callback: (filelist: FileList) => void; })
|
|
|
|
static ChooseFile({ filter, multiple = false, callback }: { filter?: string; multiple?: boolean; callback: (filelist: FileList) => void; })
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!this.chooserInput)
|
|
|
|
if (this.chooserInput)
|
|
|
|
{
|
|
|
|
this.chooserInput.remove();
|
|
|
|
this.chooserInput = document.createElement("input");
|
|
|
|
|
|
|
|
this.chooserInput.type = "file";
|
|
|
|
this.chooserInput = document.createElement("input");
|
|
|
|
this.chooserInput.style.display = "none";
|
|
|
|
this.chooserInput.type = "file";
|
|
|
|
document.body.appendChild(this.chooserInput);
|
|
|
|
this.chooserInput.style.display = "none";
|
|
|
|
}
|
|
|
|
document.body.appendChild(this.chooserInput);
|
|
|
|
|
|
|
|
|
|
|
|
this.chooserInput.accept = filter;
|
|
|
|
this.chooserInput.accept = filter;
|
|
|
|
this.chooserInput.onchange = () =>
|
|
|
|
this.chooserInput.onchange = () =>
|
|
|
|