From 8b313a0fc70a7110c4fc2d7a36bd5e1141b5828e Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 6 Dec 2017 11:42:13 -0500 Subject: [PATCH] fix storage getUrl method override issue --- js/build/embark.bundle.js | 6 +++--- js/embark.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/build/embark.bundle.js b/js/build/embark.bundle.js index 3f2b95ca..dd3c1830 100644 --- a/js/build/embark.bundle.js +++ b/js/build/embark.bundle.js @@ -309,10 +309,10 @@ EmbarkJS.Storage.setProvider = function(provider, options) { try { if (options === undefined) { self.ipfsConnection = IpfsApi('localhost', '5001'); - self.getUrl = "http://localhost:8080/ipfs/"; + self._getUrl = "http://localhost:8080/ipfs/"; } else { self.ipfsConnection = IpfsApi(options.server, options.port); - self.getUrl = options.getUrl || "http://localhost:8080/ipfs/"; + self._getUrl = options.getUrl || "http://localhost:8080/ipfs/"; } resolve(self); } catch (err) { @@ -402,7 +402,7 @@ EmbarkJS.Storage.IPFS.uploadFile = function(inputSelector) { }; EmbarkJS.Storage.IPFS.getUrl = function(hash) { - return (self.getUrl || "http://localhost:8080/ipfs/") + hash; + return (self._getUrl || "http://localhost:8080/ipfs/") + hash; }; //========================================================= diff --git a/js/embark.js b/js/embark.js index 1387ef59..e0b53c5c 100644 --- a/js/embark.js +++ b/js/embark.js @@ -227,10 +227,10 @@ EmbarkJS.Storage.setProvider = function(provider, options) { try { if (options === undefined) { self.ipfsConnection = IpfsApi('localhost', '5001'); - self.getUrl = "http://localhost:8080/ipfs/"; + self._getUrl = "http://localhost:8080/ipfs/"; } else { self.ipfsConnection = IpfsApi(options.server, options.port); - self.getUrl = options.getUrl || "http://localhost:8080/ipfs/"; + self._getUrl = options.getUrl || "http://localhost:8080/ipfs/"; } resolve(self); } catch (err) { @@ -320,7 +320,7 @@ EmbarkJS.Storage.IPFS.uploadFile = function(inputSelector) { }; EmbarkJS.Storage.IPFS.getUrl = function(hash) { - return (self.getUrl || "http://localhost:8080/ipfs/") + hash; + return (self._getUrl || "http://localhost:8080/ipfs/") + hash; }; //=========================================================