|
|
@ -3267,9 +3267,12 @@ function uploadChunk(httpClient, resourceUrl, openStream, start, end) {
|
|
|
|
'Content-Type': 'application/octet-stream',
|
|
|
|
'Content-Type': 'application/octet-stream',
|
|
|
|
'Content-Range': getContentRange(start, end)
|
|
|
|
'Content-Range': getContentRange(start, end)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {
|
|
|
|
const uploadChunkResponse = yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {
|
|
|
|
return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders);
|
|
|
|
return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders);
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
|
|
|
|
if (!requestUtils_1.isSuccessStatusCode(uploadChunkResponse.message.statusCode)) {
|
|
|
|
|
|
|
|
throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function uploadFile(httpClient, cacheId, archivePath, options) {
|
|
|
|
function uploadFile(httpClient, cacheId, archivePath, options) {
|
|
|
|