Skip to content

Commit d89fa29

Browse files
committed
wip: option one for using the new async iterable api
1 parent 1d1c0b5 commit d89fa29

File tree

1 file changed

+4
-1
lines changed
  • src/tutorials/0005-regular-files-api

1 file changed

+4
-1
lines changed

src/tutorials/0005-regular-files-api/03.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
const validate = async (result, ipfs) => {
22
const uploadedFiles = window.uploadedFiles || false
3+
const expectedResult = []
34

4-
const expectedResult = await ipfs.add(window.uploadedFiles)
5+
for await (const result of ipfs.add(window.uploadedFiles)) {
6+
expectedResult.push(result)
7+
}
58

69
if (!result) {
710
return {

0 commit comments

Comments
 (0)