public static boolean isUploadRequest(RestRequest restRequest) {
    RequestPath requestPath = RestUtils.getRequestPath(restRequest);
    RestMethod method = restRequest.getRestMethod();
    // For POST request, when the operation is "", it's upload
    // For PUT request, when the operation is named blob, it's named upload upload. However, we have to exclude the
    // case for stitch named blob.
    return method == RestMethod.POST && requestPath.getOperationOrBlobId(true).isEmpty()
        || method == RestMethod.PUT && requestPath.matchesOperation(Operations.NAMED_BLOB) && !isNamedBlobStitchRequest(
        restRequest);
  }
Return true if this request is uploading a blob. We now have two ways of uploading a blob
1. A POST request to root path
2. A PUT request to namedBlob path
Notice that stitch requests are not uploads since chunks are uploaded through signed url post.
@param restRequest The {@link RestRequest}.
@return
ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java