aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/ImageUpload.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-13 00:45:01 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-08-13 00:45:01 +0530
commit2d27d5e66649d4f5baf127a53ee5ae524eae3a59 (patch)
treec592ea219ac8cd987fc367f57b54034c450ab2ab /src/components/ui/ImageUpload.js
parentFerdi v5.6.0 (diff)
parent5.6.1-nightly.24 [skip ci] (diff)
downloadferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.gz
ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.zst
ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.zip
chore: merge from nightly branch into release branch in prep for next beta
Diffstat (limited to 'src/components/ui/ImageUpload.js')
-rw-r--r--src/components/ui/ImageUpload.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/components/ui/ImageUpload.js b/src/components/ui/ImageUpload.js
index 059610aec..bb4ea0565 100644
--- a/src/components/ui/ImageUpload.js
+++ b/src/components/ui/ImageUpload.js
@@ -26,16 +26,13 @@ export default @observer class ImageUpload extends Component {
26 26
27 dropzoneRef = null; 27 dropzoneRef = null;
28 28
29 imgPath = null;
30
31 onDrop(acceptedFiles) { 29 onDrop(acceptedFiles) {
32 const { field } = this.props; 30 const { field } = this.props;
33 31
34 acceptedFiles.forEach((file) => { 32 acceptedFiles.forEach((file) => {
35 this.imgPath = isWindows ? file.path.replace(/\\/g, '/') : file.path; 33 const imgPath = isWindows ? file.path.replace(/\\/g, '/') : file.path;
36
37 this.setState({ 34 this.setState({
38 path: this.imgPath, 35 path: imgPath,
39 }); 36 });
40 37
41 this.props.field.onDrop(file); 38 this.props.field.onDrop(file);