onDrop()

in frontend/src/App.js [110:124]


  onDrop(pictureFiles, pictureDataURLs) {
    // function for when a user uploads a picture from the device
    // if they click the x box after uploading, it will remove
    // similar photos from the state
    if (pictureFiles[0] === undefined) {
      console.log("Image deleted...");
      this.setState({pictures: [], completed:0});
    } else {
      this.setState({completed:33});
      this.getBase64(pictureFiles[0], (result) => {
          console.log(result);
          this.getSimilarImages(result);
      });
    }; 
  }