mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +02:00
Improve handling of zip file generation failing
This commit is contained in:
parent
9587b6a80e
commit
cbe8ce0c19
1 changed files with 6 additions and 3 deletions
|
@ -180,6 +180,9 @@
|
||||||
// Extract zip file URL.
|
// Extract zip file URL.
|
||||||
if (data.hasOwnProperty("files") && data.files.length > 0) {
|
if (data.hasOwnProperty("files") && data.files.length > 0) {
|
||||||
zipFileURL = data.files[0].url;
|
zipFileURL = data.files[0].url;
|
||||||
|
if (zipFileURL.slice(-4) !== ".zip") {
|
||||||
|
console.log(JSON.stringify(data)); // Data for debugging.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,9 +200,9 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zipFileURL === "") {
|
if (zipFileURL.slice(-4) !== ".zip") {
|
||||||
statusMessage = "Download file URL not provided";
|
statusMessage = "Error creating zip file for download";
|
||||||
console.log("ERROR: Clara.io FBX: " + statusMessage);
|
console.log("ERROR: Clara.io FBX: " + statusMessage + ": " + zipFileURL);
|
||||||
EventBridge.emitWebEvent(CLARA_IO_STATUS + " " + statusMessage);
|
EventBridge.emitWebEvent(CLARA_IO_STATUS + " " + statusMessage);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue