MCPcopy Create free account
hub / github.com/UiPath/uipathcli / createStartDigitizationRequest

Method createStartDigitizationRequest

utils/api/du_client.go:57–71  ·  view source on GitHub ↗
(projectId string, file stream.Stream, contentType string, uploadBar *visualization.ProgressBar, cancel context.CancelCauseFunc)

Source from the content-addressed store, hash-verified

55}
56
57func (c DuClient) createStartDigitizationRequest(projectId string, file stream.Stream, contentType string, uploadBar *visualization.ProgressBar, cancel context.CancelCauseFunc) *network.HttpRequest {
58 streamSize, _ := file.Size()
59 bodyReader, bodyWriter := io.Pipe()
60 formDataContentType := c.writeMultipartBody(bodyWriter, file, contentType, cancel)
61 uploadReader := c.progressReader("uploading...", "completing ", bodyReader, streamSize, uploadBar)
62
63 uri := c.newUriBuilder("/api/framework/projects/{projectId}/digitization/start").
64 FormatPath("projectId", projectId).
65 AddQueryString("api-version", "1").
66 Build()
67 header := http.Header{
68 "Content-Type": {formDataContentType},
69 }
70 return network.NewHttpPostRequest(uri, c.toAuthorization(c.token), header, uploadReader, -1)
71}
72
73func (c DuClient) GetDigitizationResult(projectId string, documentId string) (string, error) {
74 request := c.createDigitizeStatusRequest(projectId, documentId)

Callers 1

StartDigitizationMethod · 0.95

Calls 9

writeMultipartBodyMethod · 0.95
progressReaderMethod · 0.95
newUriBuilderMethod · 0.95
toAuthorizationMethod · 0.95
NewHttpPostRequestFunction · 0.92
AddQueryStringMethod · 0.80
FormatPathMethod · 0.80
SizeMethod · 0.65
BuildMethod · 0.45

Tested by

no test coverage detected