diff --git a/examples/example_dapp_uploader/swarm.min.js b/examples/example_dapp_uploader/swarm.min.js new file mode 100644 index 0000000..d19d954 --- /dev/null +++ b/examples/example_dapp_uploader/swarm.min.js @@ -0,0 +1,29 @@ +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,f){a!=Array.prototype&&a!=Object.prototype&&(a[e]=f.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; +$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var a=0;return function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+a++}}(); +$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var e=0;return $jscomp.iteratorPrototype(function(){return e String -> Promise Uint8Array // Gets the raw contents of a Swarm hash address. @@ -226,7 +226,7 @@ module.exports = function (_ref) { var uploadData = function uploadData(swarmUrl) { return function (data) { - return request("".concat(swarmUrl, "/bzzr:/"), { + return request("".concat(swarmUrl, "/bzz-raw:/"), { body: typeof data === "string" ? fromString(data) : data, method: "POST" }); diff --git a/package-lock.json b/package-lock.json index b0d6e7c..930fa4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "swarm-js", - "version": "0.1.38", + "version": "0.1.39", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/swarm.js b/src/swarm.js index 6c7f1f5..5adfea4 100644 --- a/src/swarm.js +++ b/src/swarm.js @@ -56,7 +56,7 @@ module.exports = ({ // String -> String -> String const rawUrl = swarmUrl => hash => - `${swarmUrl}/bzzr:/${hash}` + `${swarmUrl}/bzz-raw:/${hash}` // String -> String -> Promise Uint8Array // Gets the raw contents of a Swarm hash address. @@ -154,7 +154,7 @@ module.exports = ({ // Uploads raw data to Swarm. // Returns a promise with the uploaded hash. const uploadData = swarmUrl => data => - request(`${swarmUrl}/bzzr:/`, { + request(`${swarmUrl}/bzz-raw:/`, { body: typeof data === "string" ? fromString(data) : data, method: "POST"});