From c661ed0d7dd490507a208660115c4f8f53d5815f Mon Sep 17 00:00:00 2001 From: "Daniel A. Nagy" Date: Tue, 16 Feb 2016 11:56:46 +0100 Subject: [PATCH] Change demo/example code to work with new protocol spec. --- swarm/examples/album/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swarm/examples/album/index.js b/swarm/examples/album/index.js index 5bce32b3e3..ae156f0b91 100644 --- a/swarm/examples/album/index.js +++ b/swarm/examples/album/index.js @@ -288,7 +288,7 @@ function uploadFile(files, nr, uri) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { var i = xhr.responseText; - window.location.replace("/" + i + "/"); + window.location.replace("/bzz://" + i + "/"); }}; sendImgs(xhr, uri); } @@ -361,9 +361,9 @@ function deleteImg() var xhrd = new XMLHttpRequest(); xhrd.onreadystatechange = function () { if (xhrd.readyState === 4) { var j = xhrd.responseText; - window.location.replace("/" + j + "/"); + window.location.replace("/bzz://" + j + "/"); }}; - xhrd.open("DELETE", "/" + i + "/" + fname, true); + xhrd.open("DELETE", "/bzz://" + i + "/" + fname, true); xhrd.send(); }}; @@ -378,7 +378,7 @@ function moveUpDown(off) var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { var i = xhr.responseText; - window.location.replace("/" + i + "/#" + (eidx + off)); + window.location.replace("/bzz://" + i + "/#" + (eidx + off)); }}; sendImgs(xhr, ""); }