Improved downloading export files.

This commit is contained in:
Scott Idem
2024-04-23 17:42:44 -04:00
parent 2aff1aadbe
commit 69c1250961
6 changed files with 19 additions and 9 deletions

View File

@@ -319,7 +319,12 @@ async function handle_download_export__obj_type(
}
params['return_file'] = true;
ae_promises.download__sponsorship_export_file = await api.get_object({api_cfg: api_cfg, endpoint: endpoint, params: params, return_blob: return_file, filename: filename, auto_download: auto_download, log_lvl: log_lvl});
// let clean_filename = filename.replace(/[^a-z0-9]/gi, '_');
// let clean_filename = filename.replace(/[^a-z0-9\[\]-]/gi, '_');
let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-_.]/gi, '_');
// let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-\._ ]/gi, '_');
ae_promises.download__sponsorship_export_file = await api.get_object({api_cfg: api_cfg, endpoint: endpoint, params: params, return_blob: return_file, filename: clean_filename, auto_download: auto_download, log_lvl: log_lvl});
console.log('ae_promises.download__sponsorship_export_file:', ae_promises.download__sponsorship_export_file);
return ae_promises.download__sponsorship_export_file;