You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log('file published to ipfs: '+file.ipfs[0].hash)
24
39
40
+
/*
41
+
your dropzone object will also have the property "node", which
42
+
resolves to the IPFS node the dropzone object is using.
43
+
it is a Promise because the IPFS node is only initialized at the
44
+
moment of the first file upload.
45
+
*/
25
46
dz.node.then(ipfs=> {
26
47
ipfs.files.cat(file.hash, (err, file) => {
27
48
console.log(file.toString('utf-8'))
@@ -34,12 +55,12 @@ dz.on('success', file => {
34
55
35
56
* Most normal Dropzone features and events should work, but I'm not sure.
36
57
* There's no way to cancel the process of adding a file.
37
-
* A IPFS repo will automatically be created in the browser (in a IndexedDB) by js-ipfs, this repo will be named `"dz-ipfs"` if `ipfsRepoName` is not supplied.
38
58
* I don't know how to publish this package in a way all JS transpilers and bundlers out there can understand. Please help me.
59
+
* Please read the source if something is unclear. The source is really small.
0 commit comments