adlnet/xAPIWrapper

Sending statements with binary attachments is not supported

Closed this issue · 3 comments

The current implementation for sending statements with attachments does not support sending binary data, for example an image or pdf. Currently the code uses strings to store / concat together the multipart/mixed request, to support sending binary data this would need to be update to use something like ArrayBuffers.

Are you able to serialize those things into a text encoding and submit them as a part of your multipart/mixed request that way?

Are you able to serialize those things into a text encoding and submit them as a part of your multipart/mixed request that way?

I could possibly serialize them BASE64 encoded, but I think this would be departing from the XAPI spec which says that attachments should use 'Content-Transfer-Encoding': 'binary', according to the RFC this implies that NO encoding has been performed.

@wobrien, @vbhayden, please check out the PR I've made which resolves this.