code: public URL uploadFile(File file) throws InterruptedException, XMPPException.XMPPErrorException,
              SmackException, IOException {
          return uploadFile(file, null);
      }
docs: Request slot and uploaded file to HTTP file upload service.
  
  You don't need to request slot and upload file separately, this method will do both.
  Note that this is a synchronous call -- Smack must wait for the server response.
  
  @param file file to be uploaded
  @return public URL for sharing uploaded file
  @throws InterruptedException
  @throws XMPPException.XMPPErrorException
  @throws SmackException
  @throws IOException in case of HTTP upload errors