Skip to content

Commit 0b97205

Browse files
author
Cindy Wang
committed
DM-7725 fixed the case that the return file analysis result contains the same characters as the separator in the response.
1 parent 86268a0 commit 0b97205

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/firefly/js/ui/FileUpload.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,10 @@ export function doUpload(file, params={}) {
177177

178178
return fetchUrl(UL_URL, options).then( (response) => {
179179
return response.text().then( (text) => {
180-
// text is in format ${status}::${message}::${cacheKey}
181-
const [status, message, cacheKey, fileFormat, analysisResult] = text.split('::');
180+
// text is in format ${status}::${message}::${message}::${cacheKey}::${analysisResult}
181+
const result = text.split('::');
182+
const [status, message, cacheKey, fileFormat] = result.slice(0, 4);
183+
const analysisResult = result.slice(4).join('::');
182184
return {status, message, cacheKey, fileFormat, analysisResult};
183185
});
184186
});

0 commit comments

Comments
 (0)