Now with upload and download percent! Also better editing for session POC.
This commit is contained in:
@@ -87,6 +87,8 @@ export let post_object = async function post_object(
|
||||
try {
|
||||
window.postMessage({
|
||||
type: 'api_post_json_form',
|
||||
status: 'uploading',
|
||||
task_id: task_id,
|
||||
endpoint: endpoint,
|
||||
size_total: progressEvent.total,
|
||||
size_loaded: progressEvent.loaded,
|
||||
@@ -104,6 +106,24 @@ export let post_object = async function post_object(
|
||||
)
|
||||
.then(function (response) {
|
||||
console.log('POST Response Data:', response.data);
|
||||
try {
|
||||
window.postMessage({
|
||||
type: 'api_post_json_form',
|
||||
status: 'complete',
|
||||
task_id: task_id,
|
||||
endpoint: endpoint,
|
||||
size_total: 0,
|
||||
size_loaded: 0,
|
||||
percent_completed: 100,
|
||||
progress: 100,
|
||||
rate: 0,
|
||||
},
|
||||
'*'
|
||||
);
|
||||
} catch (error) {
|
||||
console.log('Error posting message to window:', error);
|
||||
}
|
||||
|
||||
if (response.data['data'].result === null) {
|
||||
// This should mean that the request was successful, but a result of None/null was returned from Aether API.
|
||||
// console.log('Returning null after POST');
|
||||
|
||||
Reference in New Issue
Block a user