@erebos/api-bzz-browser
Advanced tools
Comparing version 0.4.1 to 0.4.2
"use strict"; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
@@ -12,3 +10,3 @@ | ||
var _apiBzzBase = _interopRequireWildcard(require("@erebos/api-bzz-base")); | ||
var _apiBzzBase = _interopRequireDefault(require("@erebos/api-bzz-base")); | ||
@@ -31,3 +29,3 @@ /* eslint-env browser */ | ||
_proto.uploadDirectory = function uploadDirectory(directory, options) { | ||
_proto.uploadDirectory = function uploadDirectory(directory, options, headers) { | ||
if (options === void 0) { | ||
@@ -37,2 +35,6 @@ options = {}; | ||
if (headers === void 0) { | ||
headers = {}; | ||
} | ||
var form = new FormData(); | ||
@@ -55,6 +57,3 @@ Object.keys(directory).forEach(function (key) { | ||
return this._fetch(this._url + "bzz:/", { | ||
method: 'POST', | ||
body: form | ||
}).then(_apiBzzBase.resText); | ||
return this._upload(form, options, headers); | ||
}; | ||
@@ -61,0 +60,0 @@ |
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose"; | ||
/* eslint-env browser */ | ||
import BaseBzz, { resText } from '@erebos/api-bzz-base'; | ||
import BaseBzz from '@erebos/api-bzz-base'; | ||
@@ -21,3 +21,3 @@ var Bzz = | ||
_proto.uploadDirectory = function uploadDirectory(directory, options) { | ||
_proto.uploadDirectory = function uploadDirectory(directory, options, headers) { | ||
if (options === void 0) { | ||
@@ -27,2 +27,6 @@ options = {}; | ||
if (headers === void 0) { | ||
headers = {}; | ||
} | ||
var form = new FormData(); | ||
@@ -45,6 +49,3 @@ Object.keys(directory).forEach(function (key) { | ||
return this._fetch(this._url + "bzz:/", { | ||
method: 'POST', | ||
body: form | ||
}).then(resText); | ||
return this._upload(form, options, headers); | ||
}; | ||
@@ -51,0 +52,0 @@ |
{ | ||
"name": "@erebos/api-bzz-browser", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Bzz API for browser", | ||
@@ -25,4 +25,4 @@ "repository": "git@github.com:MainframeHQ/erebos.git", | ||
"@babel/runtime": "^7.0.0", | ||
"@erebos/api-bzz-base": "^0.4.0" | ||
"@erebos/api-bzz-base": "^0.4.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5359
82
Updated@erebos/api-bzz-base@^0.4.1