Update 0BDFDB.plugin.js
This commit is contained in:
parent
d3a891748a
commit
5ac1612fa5
|
@ -2,7 +2,7 @@
|
||||||
* @name BDFDB
|
* @name BDFDB
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 3.5.2
|
* @version 3.5.3
|
||||||
* @description Required Library for DevilBro's Plugins
|
* @description Required Library for DevilBro's Plugins
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -6105,7 +6105,7 @@ module.exports = (_ => {
|
||||||
onChange: e => {
|
onChange: e => {
|
||||||
let file = e.currentTarget.files[0];
|
let file = e.currentTarget.files[0];
|
||||||
if (this.refInput && file && (!filter.length || filter.some(n => file.type.indexOf(n) == 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);
|
BDFDB.ReactUtils.forceUpdate(this.refInput);
|
||||||
this.refInput.handleChange(this.refInput.props.value);
|
this.refInput.handleChange(this.refInput.props.value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue