01-19-2019 11:37
01-19-2019 11:37
I don't know how this passed any kind of documentation QA, the following code in the companion inbox documentation is just plain wrong:
import { inbox } from "file-transfer"; inbox.onnewfile = (event) => { console.log(`Received ${event.file.length} bytes as ${event.file.name}`); }
The event object has no property named file.
See the file transfer guide documentation for the correct handling:
https://dev.fitbit.com/build/guides/communications/file-transfer/#companion-inbox
Answered! Go to the Best Answer.
01-20-2019 04:10
01-20-2019 04:10
Thanks for letting us know. I'll get this updated with a working example.
01-20-2019 04:10
01-20-2019 04:10
Thanks for letting us know. I'll get this updated with a working example.