Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File transfer limited to cbor

 

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.

Best Answer
1 REPLY 1

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.

Best Answer
0 Votes