Either FIT or TCX can be retrieved using file id or relative path retrieved from the directory reading methods readActivities and readFITActivities.
The return data is either a string in the case of XML activity files of Uint8Array in the case of FIT files. Both can be used to create a Blob for appending to FormData when posting files via XmlHTTPRequest
Sorry about the console.log() missed that one when stripping them out :)
re variable, I suspect it was the decodeBinaryFile method that I hadn't cleanly scoped. Will update the request to this end and have also moved it into the * Handlers * section of the code as it makes more sense there.