12-05-2017 06:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-05-2017 06:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I wanted to transfer a plain text file and some json files. Any data I sent via the
outbox.enqueue(destFilename, data)
.then(function (ft) {
// Queued successfully
console.log("Transfer of '" + destFilename + "' successfully queued.");
})
.catch(function (error) {
// Failed to queue
throw new Error("Failed to queue '" + destFilename + "'. Error: " + error);
});
resulted in a 0 byte file being transferred .
I finally got it working by using cbor.encode(data)to get it to work.
Either you need to update your File Transfer documentation to state that it only works with cbor encoded data, or their is a bug that is not allowing other formats to be transferred.
12-05-2017 12:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-05-2017 12:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You may have luck with TextEncoder()
See my comment on a related topic:
https://community.fitbit.com/t5/SDK-Development/Need-help-with-file-transfer/m-p/2319939#M1689
I have only tried this on Android. No idea if it works on iOS.

