Подготовка к запуску внешних конвертеров, для обработки файлов pdf, doc, epub, mobi и пр.
This commit is contained in:
18
server/core/BookConverter/ConvertDocX.js
Normal file
18
server/core/BookConverter/ConvertDocX.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const ConvertBase = require('./ConvertBase');
|
||||
|
||||
class ConvertDocX extends ConvertBase {
|
||||
check(data, opts) {
|
||||
const {fileType} = opts;
|
||||
|
||||
return (fileType && fileType.ext == 'docx' && this.config.useExternalBookConverter);
|
||||
}
|
||||
|
||||
run(data, opts) {
|
||||
if (!this.check(data, opts))
|
||||
return false;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ConvertDocX;
|
||||
Reference in New Issue
Block a user