Update extract.js

This commit is contained in:
Namhyeon Go 2024-02-12 00:04:51 +09:00 committed by GitHub
parent 5125c8bb28
commit 25da76a1e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -186,7 +186,8 @@ function extract(req,res,next) {
logger.debug("file: " + file);
var fileJson={};
fileJson["name"] = file;
fileJson[`url`] = `${req.protocol}://${req.hostname}:${externalPort}${req.baseUrl}/download/${file}`;
fileJson["url"] = `${req.protocol}://${req.hostname}:${externalPort}${req.baseUrl}/download/${file}`;
fileJson["base64"] = readFileAsync(`/tmp/${file}`, { encoding: 'base64' });
filesArray.push(fileJson);
}
responseJson["files"] = filesArray;