1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-04 11:10:05 +00:00

Merge pull request #505 from sasjs/fileuploader-quick-fix

fix(fileUploader): parsing debug response for SASVIYA
This commit is contained in:
Allan Bowe
2021-08-09 18:22:46 +03:00
committed by GitHub

View File

@@ -61,15 +61,14 @@ export class FileUploader {
'Content-Type': 'text/plain'
}
// currently only web approach is supported for file upload
// therefore log is part of response with debug enabled and must be parsed
return this.requestClient
.post(uploadUrl, formData, undefined, 'application/json', headers)
.then(async (res) => {
// for web approach on Viya
if (
this.sasjsConfig.debug &&
(this.sasjsConfig.useComputeApi === null ||
this.sasjsConfig.useComputeApi === undefined) &&
this.sasjsConfig.serverType === ServerType.SasViya
this.sasjsConfig.serverType === ServerType.SasViya &&
this.sasjsConfig.debug
) {
const jsonResponse = await parseSasViyaDebugResponse(
res.result as string,