Files
OSIT-AE-App-Native-Electron/app/js/app_v3.js

20 lines
721 B
JavaScript

const path = require('path');
const { ipcRenderer } = require('electron');
/* Updated 2022-03-07 */
// function open_local_file({hash, host_file_cache_path, filename}) {
function open_local_file({host_file_cache_path, hash, filename}) {
console.log('*** open_local_file() ***');
// hash = this.getAttribute('data-hash_sha256');
// let file_path = path.join(host_file_cache_path, hash);
// filename = this.getAttribute('data-filename');
console.log(host_file_cache_path);
console.log(hash);
// console.log(file_path);
console.log(filename);
// ipcRenderer.send('open_local_file', file_path, filename);
ipcRenderer.send('open_local_file', host_file_cache_path, hash, filename);
}