Hi, there.
I'm having trouble uploading a TCX file to Strava. Here is my Node.js code:
var file = request.get(tcxEndpointUrl);
headers: {
Authorization: 'Bearer ' + strava.token
},
formData: {
data_type: 'tcx',
file: file
}
}, function() {
console.log('post result', arguments);
});
The resulting body is:
{"message":"Bad Request","errors":[{"resource":"Upload","field":"data","code":"empty"}]}
Can anyone point me in the right direction here? First, I don't see a `data` field outlined in the docs, so I'm not sure what that means. Second, the `@` sign in front of the file name, I'm not sure what that's about. I feel like the issue lies in the way I'm posting the file to the Strava API.
Thanks in advance for any help you can offer.
Michael