Most of the key features work at this point.
This commit is contained in:
@@ -5,9 +5,15 @@ const fs = require('fs');
|
||||
const { ipcRenderer } = require('electron');
|
||||
|
||||
exports.check_file_cache = async function () {
|
||||
console.log('**** *** ** * FUNCTION: check_file_cache * ** *** ****');
|
||||
console.log('Checking the local file cache against the remote server.');
|
||||
tbl_event_file.iterate(function(file_value, key, iteration) {
|
||||
//if (file_value.event_location_id == event_location_id) {
|
||||
console.log(api_base_url);
|
||||
console.log(api_temporary_token);
|
||||
|
||||
//console.log(save_path);
|
||||
if (api_base_url && api_temporary_token) {
|
||||
tbl_event_file.iterate(function(file_value, key, iteration) {
|
||||
//if (file_value.event_location_id == event_location_id) {
|
||||
//console.log('f: ('+file_value.event_file_id+') '+file_value.event_file_filename+' ***')
|
||||
|
||||
file_id = file_value.id; // NOTE: This is the event_file.id or event_file_id.
|
||||
@@ -22,8 +28,13 @@ exports.check_file_cache = async function () {
|
||||
let api_endpoint = '/event/file/'+file_id+'/download';
|
||||
ipcRenderer.send('download_file', api_base_url, api_endpoint, api_temporary_token, save_path); // Must download file using main node.js thread.
|
||||
}
|
||||
//}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
console.log('The api_base_url or api_temporary_token has not been set.');
|
||||
console.log(api_base_url);
|
||||
console.log(api_temporary_token);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user