From 9703ffa533dbb2106dc74dcfbf883eb4bfc1fa00 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Jan 2019 16:49:55 +0100 Subject: fix query --- client/faceSearch/faceSearch.query.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/client/faceSearch/faceSearch.query.js b/client/faceSearch/faceSearch.query.js index de7e47b6..8a82373e 100644 --- a/client/faceSearch/faceSearch.query.js +++ b/client/faceSearch/faceSearch.query.js @@ -19,6 +19,11 @@ class FaceSearchQuery extends Component { } upload(blob) { + if (this.state.image) { + URL.revokeObjectURL(this.state.image) + } + const url = URL.createObjectURL(blob) + this.setState({ image: url }) this.props.actions.upload(this.props.payload, blob) } @@ -37,13 +42,13 @@ class FaceSearchQuery extends Component {
{image ? null : } + {result.loading && ( +
+ +
+ )}
- {result.loading && ( -
- -
- )}

Search by Image

-- cgit v1.2.3-70-g09d2