From c44eeff8f1d962122e4b38e78574ee9bd7b093bc Mon Sep 17 00:00:00 2001 From: srgooglo <38926803+srgooglo@users.noreply.github.com> Date: Thu, 5 Mar 2020 21:54:50 +0100 Subject: [PATCH] 0.2.05A2 --- src/components/PostCreator/index.js | 54 ++++++++++++++++++--------- src/components/PostCreator/index.less | 27 ++++++++++++-- 2 files changed, 60 insertions(+), 21 deletions(-) diff --git a/src/components/PostCreator/index.js b/src/components/PostCreator/index.js index c002c7af..17659e6d 100755 --- a/src/components/PostCreator/index.js +++ b/src/components/PostCreator/index.js @@ -48,12 +48,13 @@ class PostCreator extends React.PureComponent{ } handleFileUpload = info => { - console.log('handle') + console.log(info.file.originFileObj) if (info.file.status === 'uploading') { this.setState({ loading: true }); return; } if (info.file.status === 'done') { + this.ToogleUpload() // Get this url from response in real world. getBase64(info.file.originFileObj, imageUrl => this.setState({ @@ -93,7 +94,7 @@ class PostCreator extends React.PureComponent{ } handlePublishPost = (e) => { - const { rawtext, shareWith, imageUrl} = this.state; + const { rawtext, shareWith, imageUrl } = this.state; let postFile; if (imageUrl) { console.log('EXIST ',imageUrl) @@ -114,6 +115,21 @@ class PostCreator extends React.PureComponent{ RefreshFeed() }) } + OpenControl = () =>{ + let controls = [( +
-
Click or drag file to this area to upload
-- Support for a single or bulk upload. -
+
+
Click or drag file to this area to upload
+