From 14c42dd71319e9ccfb7d0b17c0c9c2d3f682a385 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 21 Oct 2023 12:55:10 +0200 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 603c8e98f7..69c6f41ca9 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -6169,7 +6169,7 @@ module.exports = (_ => { onChange: e => { let file = e.currentTarget.files[0]; if (this.refInput && file && (!filter.length || filter.some(n => file.type.indexOf(n) == 0))) { - this.refInput.props.value = this.props.searchFolders ? file.path.split(file.name).slice(0, -1).join(file.name) : `${this.props.mode == "url" ? "url('" : ""}${(this.props.useFilePath) ? file.path : `data:${file.type};base64,${Buffer.from(Internal.LibraryRequires.fs.readFileSync(file.path, "")).toString("base64")}`}${this.props.mode ? "')" : ""}`; + this.refInput.props.value = this.props.searchFolders ? file.path.split(file.name).slice(0, -1).join(file.name) : `${this.props.mode == "url" ? "url('" : ""}${(this.props.useFilePath) ? file.path : `data:${file.type};base64,${btoa((new TextDecoder()).decode(Internal.LibraryRequires.fs.readFileSync(file.path, "")))}`}${this.props.mode ? "')" : ""}`; BDFDB.ReactUtils.forceUpdate(this.refInput); this.refInput.handleChange(this.refInput.props.value); }