Interface RawUploadRestClient
@Path("/uploads/raw")
@RegisterRestClient(configKey="connector-intake-raw")
public interface RawUploadRestClient
Streaming HTTP client to connector-intake's raw upload endpoint
(
POST /uploads/raw) — the S3-style path that streams a document of
any length straight to :intake/S3 without ever buffering it whole.
The body is an InputStream: the REST client forwards it
chunk-by-chunk, so single-doc uploads of arbitrary size never go fully in
memory (unlike the gRPC UploadBlob, which is an in-memory unary call
for small docs). Content-Length is required by the endpoint.
Discovery via quarkus.rest-client.connector-intake-raw.url (Stork
in prod, a fixed URL in dev) — same pattern connector-intake uses for the
repository upload client.
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseuploadRaw(InputStream body, long contentLength, String contentType, String datasourceId, String apiKey, String sourceDocId, String filename, String crawlId) Streams a raw document body to connector-intake'sPOST /uploads/rawendpoint, forwarding it chunk-by-chunk so arbitrarily large docs never buffer in memory.
-
Method Details
-
uploadRaw
@POST @Consumes("application/octet-stream") jakarta.ws.rs.core.Response uploadRaw(InputStream body, @HeaderParam("content-length") long contentLength, @HeaderParam("content-type") String contentType, @HeaderParam("x-datasource-id") String datasourceId, @HeaderParam("x-api-key") String apiKey, @HeaderParam("x-source-doc-id") String sourceDocId, @HeaderParam("x-filename") String filename, @HeaderParam("x-crawl-id") String crawlId) Streams a raw document body to connector-intake'sPOST /uploads/rawendpoint, forwarding it chunk-by-chunk so arbitrarily large docs never buffer in memory.- Parameters:
body- the document bytes, streamed straight throughcontentLength- the document length in bytes (required by the endpoint)contentType- the document's MIME typedatasourceId- the datasource id the upload is attributed toapiKey- the datasource API key authorizing the uploadsourceDocId- the caller's source document id for this uploadfilename- the original file name of the documentcrawlId- the crawl id this upload belongs to- Returns:
- the upload endpoint's HTTP response
-