code: public File upload(int pollingInterval) throws UploadFailureException {
          RequestHelper requestHelper = client.getRequestHelper();
          URI uploadUrl = Urls.uploadFromUrl(sourceUrl, client.getPublicKey(),store);
          String token = requestHelper.executeQuery(new HttpGet(uploadUrl), false, UploadFromUrlData.class).token;
          URI statusUrl = Urls.uploadFromUrlStatus(token);
          while (true) {
              sleep(pollingInterval);
              HttpGet request = new HttpGet(statusUrl);
              UploadFromUrlStatusData data = requestHelper.executeQuery(request, false, UploadFromUrlStatusData.class);
              if (data.status.equals("success")) {
                  return client.getFile(data.fileId);
              } else if (data.status.equals("error") || data.status.equals("failed")) {
                  throw new UploadFailureException();
              }
          }
      }
docs: Synchronously uploads the file to Uploadcare.
  
  The calling thread will be busy until the upload is finished.
  
  @param pollingInterval Progress polling interval in ms
  @return An Uploadcare file
  @throws UploadFailureException