Finally got the presenter file upload working better.
This commit is contained in:
@@ -1725,7 +1725,7 @@ async function handle_download_export__event_exhibit_tracking(
|
||||
log_lvl=0
|
||||
}
|
||||
) {
|
||||
console.log('*** stores_event_api.js: get_event_exhibit_tracking_export() ***');
|
||||
console.log('*** ae_events_functions.js: get_event_exhibit_tracking_export() ***');
|
||||
|
||||
const endpoint = `/event/exhibit/${exhibit_id}/tracking/export`;
|
||||
if (file_type == 'CSV' || file_type == 'Excel') {
|
||||
@@ -1748,6 +1748,58 @@ async function handle_download_export__event_exhibit_tracking(
|
||||
}
|
||||
|
||||
|
||||
// Updated 2024-06-14
|
||||
async function create_event_file_obj_from_hosted_file_async(
|
||||
{
|
||||
api_cfg,
|
||||
hosted_file_id,
|
||||
params={},
|
||||
data={},
|
||||
return_obj=false,
|
||||
inc_hosted_file=false,
|
||||
return_meta=false,
|
||||
log_lvl=0
|
||||
}
|
||||
) {
|
||||
console.log('*** ae_events_functions.js: create_event_file_obj_from_hosted_file() ***');
|
||||
|
||||
let endpoint = `/event/file/from_hosted_file/${hosted_file_id}`;
|
||||
if (return_obj) {
|
||||
params['return_obj'] = true;
|
||||
}
|
||||
if (inc_hosted_file) {
|
||||
params['inc_hosted_file'] = true;
|
||||
}
|
||||
let event_file_obj_post_promise = await api.post_object({
|
||||
api_cfg: api_cfg,
|
||||
endpoint: endpoint,
|
||||
params: params,
|
||||
data: data,
|
||||
return_obj: return_obj,
|
||||
return_meta: return_meta,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (result) {
|
||||
console.log('POST DONE create_event_file_obj_from_hosted_file');
|
||||
console.log(result);
|
||||
return result;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
return false; // Returning false since something may have gone wrong. Also more in line with what the API returns.
|
||||
// return error;
|
||||
});
|
||||
|
||||
// console.log(event_file_obj_post_promise);
|
||||
if (return_obj) {
|
||||
return event_file_obj_post_promise;
|
||||
} else {
|
||||
return event_file_obj_post_promise.event_file_id_random;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
let export_obj = {
|
||||
handle_load_ae_obj_id__event: handle_load_ae_obj_id__event,
|
||||
handle_load_ae_obj_li__event: handle_load_ae_obj_li__event,
|
||||
@@ -1776,5 +1828,7 @@ let export_obj = {
|
||||
handle_create_ae_obj__exhibit_tracking: handle_create_ae_obj__exhibit_tracking,
|
||||
handle_update_ae_obj__exhibit_tracking: handle_update_ae_obj__exhibit_tracking,
|
||||
handle_download_export__event_exhibit_tracking: handle_download_export__event_exhibit_tracking,
|
||||
|
||||
create_event_file_obj_from_hosted_file_async: create_event_file_obj_from_hosted_file_async,
|
||||
};
|
||||
export let events_func = export_obj;
|
||||
|
||||
@@ -135,8 +135,8 @@ let events_local_data_struct: key_val = {
|
||||
'pres_mgmt': {
|
||||
show_content__session_description: false,
|
||||
show_content__presentation_description: false,
|
||||
show_content__agree_text: false,
|
||||
show_content__presenter_start: false,
|
||||
// show_content__agree_text: false,
|
||||
// show_content__presenter_start: false,
|
||||
|
||||
disable_submit__opt_out: true,
|
||||
submit_status__opt_out: null,
|
||||
@@ -263,11 +263,19 @@ let events_session_data_struct: key_val = {
|
||||
|
||||
// Presentation Management (Distributing)
|
||||
'pres_mgmt': {
|
||||
'fulltext_search_qry_str': null,
|
||||
'status_qry__search': null,
|
||||
fulltext_search_qry_str: null,
|
||||
status_qry__search: null,
|
||||
|
||||
disable_submit__event_file_obj: false,
|
||||
|
||||
show_form__search: true,
|
||||
show_form__search_results: true,
|
||||
|
||||
show_content__agree_text: false,
|
||||
show_content__presenter_start: false,
|
||||
|
||||
new_upload_list: null,
|
||||
files_uploading_count: null,
|
||||
},
|
||||
|
||||
// Speakers Management (Collection)
|
||||
|
||||
Reference in New Issue
Block a user