code: public void finish() {
  
  		try {
  
  			FileChannel channel = getChannel(false);
  
  			if (channel != null && channel.isOpen()) {
  
  				channel.force(true);
  				channel.close();
  
  				this.privateFileChannel = null;
  
  				//file.increaseVersion();
  				file.notifyUploadCompletion();
  			}
  
  		} catch (IOException e) {
  
  			logger.warn("Unable to finish file upload", e);
  		}
  	}
docs: Called when the WebSocket connection is closed