mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 12:46:00 +00:00
data import download fixes
This commit is contained in:
@@ -43,8 +43,8 @@ ${
|
||||
? `
|
||||
const downloaded=await dbgateApi.download(${JSON.stringify(props.downloadUrl)});
|
||||
const reader=await ${extractShellApiFunctionName(functionName)}(Object.assign(${JSON.stringify(
|
||||
props
|
||||
)}, { fileName: downloaded, downloadUrl: undefined }));
|
||||
_.omit(props, ['downloadUrl'])
|
||||
)}, { fileName: downloaded }));
|
||||
`
|
||||
: `const reader=await ${extractShellApiFunctionName(functionName)}(${JSON.stringify(props)});`
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ const { uploadsdir } = require('../utility/directories');
|
||||
const { downloadFile } = require('../utility/downloader');
|
||||
|
||||
async function download(url) {
|
||||
const tmpFile = path.join(uploadsdir(), uuidv1() + '.tgz');
|
||||
const tmpFile = path.join(uploadsdir(), uuidv1());
|
||||
await downloadFile(url, tmpFile);
|
||||
return tmpFile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user