@nebulous/skynet
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -27,3 +27,3 @@ const axios = require('axios') | ||
.then(resp => { | ||
resolve(resp.data.skylink) | ||
resolve(`sia://${resp.data.skylink}`) | ||
}).catch(error => { | ||
@@ -36,3 +36,3 @@ reject(error) | ||
function DownloadFile(path, skylink, opts) { | ||
const url = `${trimTrailingSlash(opts.portalUrl)}/${skylink}` | ||
const url = `${trimTrailingSlash(opts.portalUrl)}/${trimSiaPrefix(skylink)}` | ||
@@ -54,2 +54,6 @@ const writer = fs.createWriteStream(path) | ||
function trimSiaPrefix(str) { | ||
return str.replace("sia://", "") | ||
} | ||
function trimTrailingSlash(str) { | ||
@@ -56,0 +60,0 @@ return str.replace(/\/$/, ""); |
{ | ||
"name": "@nebulous/skynet", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Skynet SDK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3337
52