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.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Thanks for letting us know. I'll get this updated with a working example.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.