Improve handling of zip file generation failing

This commit is contained in:
David Rowe 2017-01-12 21:33:32 +13:00
parent 9587b6a80e
commit cbe8ce0c19

View file

@ -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;
} }