addendum to prior change for github compatibility 10/2310/2
authorEric Z <ezavesky@research.att.com>
Thu, 12 Jul 2018 18:56:28 +0000 (13:56 -0500)
committerEric Z <ezavesky@research.att.com>
Thu, 12 Jul 2018 18:56:28 +0000 (13:56 -0500)
- switch to using protobuf fetch utility, not XHR

Issue-ID: ACUMOS-1295
Change-Id: I1776e7e6da7bb763a2b87af96119fb1faaf217f5
Signed-off-by: Eric Z <ezavesky@research.att.com>
web_demo/demo-framework.js

index 20bd08b..c5ee130 100644 (file)
@@ -441,7 +441,6 @@ function doPostBlob(blobData)
 
 function doPostPayload(sendPayload, domHeaders, dstDiv, dstImg, imgPlaceholder)
 {
-
     var hd = $(document.body).data('hdparams');
     hd.imageIsWaiting = true;
 
@@ -547,11 +546,11 @@ function downloadBlobIn() {
 function downloadBlobProto() {
     var namePackage = $(document.body).data('hdparams').protoKeys[0];
     var pathProto = $(document.body).data('hdparams').protoObj[namePackage]['path'];
-    $.get(pathProto, function(data) {
+    protobuf.util.fetch(pathProto, {binary:true}, function(statusStr, data) {
         var fileBase = pathProto.split(/[\\\/]/);       // added 7/11/18 for proto context
         fileBase = fileBase[fileBase.length - 1];
         return downloadBlob(data, fileBase, "text/plain");
-    }, 'text');
+    });
 }