Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
LesFerch authored Nov 23, 2024
1 parent fa01872 commit d9d8aa8
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Src/WinSetViewJS.htm
Original file line number Diff line number Diff line change
Expand Up @@ -990,21 +990,18 @@
switch (LCase(Action)) {
case "open":
ret = window.external.OpenFileDialog(Path, Filter, EnableMulti);
o = JSON.parse(ret);
if(o.status!=1) return "";
if (ReturnMulti) return o.files.join("|");
return o.files[0];
break;
case "save":
ret = window.external.SaveFileDialog(Path, Filter, EnableMulti);
o = JSON.parse(ret);
if(o.status!=1) return "";
return o.path;
break;
}
if (ret.indexOf(":0") > 0) return "";
ret = Replace(ret, "}", "");
ret = Replace(ret, "]", "");
ret = Replace(ret, "[", "");
ret = ret.split("\":\"")[1];
ret = Replace(ret, "\\\\", "\\");
ret = Replace(ret, "\",\"", "|");
ret = Replace(ret, "\"", "");
if (ReturnMulti) return ret;
return ret.split("|")[0];
}

// Load Settings button
Expand Down

0 comments on commit d9d8aa8

Please sign in to comment.