Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

small fix to bundle-browserify for recent js-ipfs-api #849

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/bundle-browserify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var ipfs = IPFS()

function store () {
var toStore = document.getElementById('source').value
ipfs.add(Buffer.from(toStore), function (err, res) {
ipfs.files.add(Buffer.from(toStore), function (err, res) {
if (err || !res) {
return console.error('ipfs add error', err, res)
}
Expand All @@ -21,8 +21,7 @@ function store () {
}

function display (hash) {
// buffer: true results in the returned result being a buffer rather than a stream
ipfs.cat(hash, {buffer: true}, function (err, res) {
ipfs.files.cat(hash, function (err, res) {
if (err || !res) {
return console.error('ipfs cat error', err, res)
}
Expand Down
5 changes: 2 additions & 3 deletions examples/bundle-browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
"license": "MIT",
"devDependencies": {
"browserify": "^13.1.1",
"ipfs-api": "^11.1.0",
"ipfs-api": "^24.0.0",
"http-server": "~0.9.0"
},
"dependencies": {
}
"dependencies": {}
}