mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Enhance file download handling and format validation in htmlDocumentConverter
This commit is contained in:
@@ -225,9 +225,22 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
||||
}
|
||||
})
|
||||
|
||||
electron.ipcMain.on("file_download", async() => {
|
||||
await mapFunctions.get("htmlDocumentConverter").convert({inputPath:globalFinalHtmlPath, format: globalArgs.document.outputType, showDialog: true});
|
||||
})
|
||||
ipcMain.handle("file_download", async () => {
|
||||
try {
|
||||
const format = globalArgs.document.outputType.replace('.', '').toLowerCase();
|
||||
|
||||
return await mapFunctions
|
||||
.get("htmlDocumentConverter")
|
||||
.convert({
|
||||
inputPath: globalFinalHtmlPath,
|
||||
format,
|
||||
showDialog: true
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("Download failed:", err);
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
|
||||
electron.ipcMain.on("speaker_submit", async() => {
|
||||
console.log("\n\n\nJa also hier kam was an \n\n\n");
|
||||
|
||||
Reference in New Issue
Block a user