Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2023-11-06 09:57:29 +01:00
parent d3a891748a
commit 5ac1612fa5
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB
* @author DevilBro
* @authorId 278543574059057154
* @version 3.5.2
* @version 3.5.3
* @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -6105,7 +6105,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,${btoa(BDFDB.DiscordUtils.bufferToString(Internal.LibraryRequires.fs.readFileSync(file.path, "")))}`}${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,${Internal.LibraryRequires.fs.readFileSync(file.path, "base64")}`}${this.props.mode ? "')" : ""}`;
BDFDB.ReactUtils.forceUpdate(this.refInput);
this.refInput.handleChange(this.refInput.props.value);
}