update ipfs lib
This commit is contained in:
parent
0b00f99f09
commit
12c8e223d6
|
@ -280,8 +280,8 @@ EmbarkJS.Storage.IPFS.get = function(hash) {
|
|||
var connectionError = new Error('No IPFS connection. Please ensure to call Embark.Storage.setProvider()');
|
||||
reject(connectionError);
|
||||
}
|
||||
EmbarkJS.Storage.ipfsConnection.object.get([hash]).then(function(node) {
|
||||
resolve(node.data);
|
||||
EmbarkJS.Storage.ipfsConnection.object.get(hash).then(function(node) {
|
||||
resolve(node.data.toString());
|
||||
}).catch(function(err) {
|
||||
reject(err);
|
||||
});
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"follow-redirects": "^1.2.4",
|
||||
"fs-extra": "^2.0.0",
|
||||
"globule": "^1.1.0",
|
||||
"ipfs-api": "6.0.2",
|
||||
"ipfs-api": "17.2.4",
|
||||
"merge": "^1.2.0",
|
||||
"mocha": "^2.2.5",
|
||||
"orbit-db": "^0.17.3",
|
||||
|
|
|
@ -59,19 +59,19 @@ $(document).ready(function() {
|
|||
//EmbarkJS.Storage.setProvider('ipfs',{server: 'localhost', port: '5001'});
|
||||
|
||||
$("#storage .error").hide();
|
||||
EmbarkJS.Storage.ipfsConnection.ping()
|
||||
.then(function(){
|
||||
//EmbarkJS.Storage.ipfsConnection.ping()
|
||||
//.then(function(){
|
||||
$("#status-storage").addClass('status-online');
|
||||
$("#storage-controls").show();
|
||||
})
|
||||
.catch(function(err) {
|
||||
if(err){
|
||||
console.log("IPFS Connection Error => " + err.message);
|
||||
$("#storage .error").show();
|
||||
$("#status-storage").addClass('status-offline');
|
||||
$("#storage-controls").hide();
|
||||
}
|
||||
});
|
||||
//})
|
||||
//.catch(function(err) {
|
||||
// if(err){
|
||||
// console.log("IPFS Connection Error => " + err.message);
|
||||
// $("#storage .error").show();
|
||||
// $("#status-storage").addClass('status-offline');
|
||||
// $("#storage-controls").hide();
|
||||
// }
|
||||
//});
|
||||
|
||||
$("#storage button.setIpfsText").click(function() {
|
||||
var value = $("#storage input.ipfsText").val();
|
||||
|
|
Loading…
Reference in New Issue