Skip to content

Commit

Permalink
multiple file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Aug 13, 2015
1 parent 1089010 commit 3c89be7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/controls/drag-drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ function dragDrop (event, fileArray) {
return console.error(new Error('Can\'t upload file, IPFS Node is off'))
}

if (fileArray.length > 1) {
return console.log('Only supports single files for now')
}

console.log('uploading ->', path.basename(fileArray[0]))

ipc.emit('uploading', {Name: path.basename(fileArray[0])})
fileArray.forEach(function (file) {
console.log('uploading ->', path.basename(file))
ipc.emit('uploading', {Name: path.basename(file)})
})

ipfsAPI.add(fileArray, function (err, res) {
if (err || !res) {
Expand Down

0 comments on commit 3c89be7

Please sign in to comment.