docs: @Override
    public void upload(SFSession connection, String command, int parallelism, boolean uploadFromStream,
                       String remoteStorageLocation, File srcFile, String destFileName, InputStream inputStream,
                       FileBackedOutputStream fileBackedOutputStream, StorageObjectMetadata meta, String stageRegion)
    throws SnowflakeSQLException
    {
      final List<FileInputStream> toClose = new ArrayList<>();
      long originalContentLength = meta.getContentLength();
  
      SFPair<InputStream, Boolean> uploadStreamInfo = createUploadStream(
          srcFile, uploadFromStream, inputStream, meta, originalContentLength,
          fileBackedOutputStream, toClose);
  
      if (!(meta instanceof AzureObjectMetadata))
      {
        throw new IllegalArgumentException("Unexpected metadata object type");
      }
  
      int retryCount = 0;
      do
      {
        try
        {
          logger.debug("Starting upload");
          InputStream fileInputStream = uploadStreamInfo.left;
          CloudBlobContainer container = azStorageClient.getContainerReference(remoteStorageLocation);
          CloudBlockBlob blob = container.getBlockBlobReference(destFileName);
  
          // Set the user-defined/Snowflake metadata and upload the BLOB
          blob.setMetadata((HashMap<String, String>) meta.getUserMetadata());
  
          // Note that Azure doesn't offer a multi-part parallel upload library,
          // where the user has control of block size and parallelism
          // we rely on Azure to handle the upload, hence the "parallelism" parameter is ignored
          // in the Azure implementation of the method
          blob.upload(fileInputStream,  // input stream to upload from
                      -1                // -1 indicates an unknown stream length
          );
          logger.debug("Upload successful");
  
          blob.uploadMetadata();
  
          // close any open streams in the "toClose" list and return
          for (FileInputStream is : toClose)
            IOUtils.closeQuietly(is);
  
          return;
        }
        catch (Exception ex)
        {
          handleAzureException(ex, ++retryCount, "upload", connection, command, this);
  
          if (uploadFromStream && fileBackedOutputStream == null)
          {
            throw new SnowflakeSQLException(ex, SqlState.SYSTEM_ERROR,
                                            ErrorCode.IO_ERROR.getMessageCode(),
                                            "Encountered exception during upload: " +
                                            ex.getMessage() + "\nCannot retry upload from stream.");
          }
          uploadStreamInfo = createUploadStream(srcFile, uploadFromStream,
                                                inputStream, meta, originalContentLength,
                                                fileBackedOutputStream, toClose);
        }
  
      }
      while (retryCount <= getMaxRetries());
  
      for (FileInputStream is : toClose)
        IOUtils.closeQuietly(is);
  
      throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,
                                      ErrorCode.INTERNAL_ERROR.getMessageCode(),
                                      "Unexpected: upload unsuccessful without exception!");
    }