From cfd06b5fe1a34fd1dcdc970915ff67a098c94f50 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 13 Mar 2019 20:43:14 -0400 Subject: [PATCH] feature(@embark/ipfs) add other gateway urls for ipfs --- .../embark/src/lib/modules/ipfs/upload.js | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/embark/src/lib/modules/ipfs/upload.js b/packages/embark/src/lib/modules/ipfs/upload.js index 04d2048d2..4703109f5 100644 --- a/packages/embark/src/lib/modules/ipfs/upload.js +++ b/packages/embark/src/lib/modules/ipfs/upload.js @@ -46,28 +46,30 @@ class IPFS { function printUrls(dir_hash, callback) { console.log(("=== " + __("DApp available at") + " http://localhost:8080/ipfs/" + dir_hash + "/").green); console.log(("=== " + __("DApp available at") + " https://ipfs.infura.io/ipfs/" + dir_hash + "/").green); + console.log(("=== " + __("DApp available at") + " https://gateway.ipfs.io/ipfs/" + dir_hash + "/").green); + console.log(("=== " + __("DApp available at") + " https://cloudflare-ipfs.com/ipfs/" + dir_hash + "/").green); if(self.env === 'development') { console.log(("\n=== " + - "Blockchain must be running".bold + + "Blockchain must be running".bold + " ===").yellow); console.log(( - "embark run".italic + - __(" or ") + - "embark blockchain".italic + + "embark run".italic + + __(" or ") + + "embark blockchain".italic + __(" must be running when the site is loaded to interact with the blockchain.\n") ).yellow); - console.log(("=== " + - "Usage with the public gateway".bold + + console.log(("=== " + + "Usage with the public gateway".bold + " ===").yellow); console.log(( __("If you wish to load your development site from the public gateway (ipfs.infura.io), you will need to first update your CORS settings (") + - "config/blockchain.js > wsOrigins".italic + + "config/blockchain.js > wsOrigins".italic + __(" and ") + "config/blockchain.js > rpcCorsDomain".italic + - __(") to allow ") + - "ipfs.infura.io".underline + - __(". If these were set to 'auto', they would now need to be set to ") + - "https://ipfs.infura.io,http://localhost:8000,http://localhost:8500,embark".underline + + __(") to allow ") + + "ipfs.infura.io".underline + + __(". If these were set to 'auto', they would now need to be set to ") + + "https://ipfs.infura.io,http://localhost:8000,http://localhost:8500,embark".underline + ".\n").yellow); }