Улучшено скачивание файлов - добавлено читабельное имя файла

This commit is contained in:
Book Pauk
2022-09-26 16:04:26 +07:00
parent 92303cadc3
commit afef0ed04c
6 changed files with 87 additions and 21 deletions

View File

@@ -147,8 +147,10 @@ class WebSocketController {
async getBookLink(req, ws) {
if (!utils.hasProp(req, 'bookPath'))
throw new Error(`bookPath is empty`);
if (!utils.hasProp(req, 'downFileName'))
throw new Error(`downFileName is empty`);
const result = await this.webWorker.getBookLink(req.bookPath);
const result = await this.webWorker.getBookLink({bookPath: req.bookPath, downFileName: req.downFileName});
this.send(result, req, ws);
}