update upload function

This commit is contained in:
Mohamed Nouffer
2021-09-13 13:14:22 +05:30
parent a8522f96a2
commit 17f4170f62

View File

@ -46,17 +46,17 @@ function callInitFileMover(re) {
// A chunk of data has been received. // A chunk of data has been received.
resp.on('data', (chunk) => { resp.on('data', (chunk) => {
data += chunk;
});
// The whole response has been received. Print out the result.
resp.on('end', () => {
//debug //debug
data = `{ data = `{
"construction_id": 3, "construction_id": 3,
"file_name": "ini_データ入力シート.xlsx", "file_name": "ini_データ入力シート.xlsx",
"file_type": "dataSheet" "file_type": "dataSheet"
}` }`
data += chunk;
});
// The whole response has been received. Print out the result.
resp.on('end', () => {
if(data !== 'no match'){ if(data !== 'no match'){
resdata = JSON.parse(data); resdata = JSON.parse(data);
console.log(resdata); console.log(resdata);