This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
examples/exchange-files-in-browser/public/js Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,25 @@ function start () {
32
32
if ( ! node ) {
33
33
updateView ( 'starting' , node )
34
34
35
- // DEV: To test with latest js-ipfs
35
+ const options = {
36
+ repo : 'ipfs-' + Math . random ( ) ,
37
+ config : {
38
+ Addresses : {
39
+ Swarm : [
40
+ // '/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star'
41
+ '/dns4/ws-star.discovery.libp2p.io/wss/p2p-websocket-star'
42
+ ]
43
+ }
44
+ }
45
+ }
46
+
47
+ // IFDEV: To test with latest js-ipfs
36
48
const IPFS = require ( 'ipfs' )
37
- node = new IPFS ( { repo : 'ipfs-' + Math . random ( ) } )
49
+ node = new IPFS ( options )
50
+ // VEDIF
38
51
39
52
// EXAMPLE
40
- // node = new self.Ipfs({ repo: 'ipfs-' + Math.random() } )
53
+ // node = new self.Ipfs(options )
41
54
42
55
node . once ( 'start' , ( ) => node . id ( ( err , id ) => {
43
56
if ( err ) { return onError ( err ) }
@@ -121,7 +134,7 @@ function onDrop (event) {
121
134
122
135
const files = [ ]
123
136
for ( let i = 0 ; i < filesDropped . length ; i ++ ) {
124
- files . pUsh ( filesDropped [ i ] )
137
+ files . push ( filesDropped [ i ] )
125
138
}
126
139
127
140
files . forEach ( ( file ) => {
You can’t perform that action at this time.
0 commit comments