From b95e21e51a990c2d311c0300bf8a5b987ddd9d97 Mon Sep 17 00:00:00 2001 From: Selbi Ereshova Date: Tue, 26 Jul 2022 16:27:37 +0300 Subject: [PATCH] #688 Got data size from response --- app/js/app-utilities.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/js/app-utilities.js b/app/js/app-utilities.js index 37c1e7209..f45f4631d 100644 --- a/app/js/app-utilities.js +++ b/app/js/app-utilities.js @@ -2570,10 +2570,12 @@ appUtilities.launchWithModelFile = function() { success: async function(data, text, xhr){ // here we can get 404 as well, for example, so there are still error cases to handle + console.log("data.response.body",data.response.body.length) + var dataSize = data.response.body.length var fileSize = xhr.getResponseHeader('Content-Length'); - console.log(fileSize); + console.log("filesize from content-length",fileSize); - if(fileSize>250000 && (fileExtension === "sbml" || fileExtension === "xml") ) + if(dataSize>250000 && (fileExtension === "sbml" || fileExtension === "xml") ) { chiseInstance.showSpinnerText('paths-byURL-spinner') }