I'm trying to send compressed data to a server. To do this I'm attempting to pass it into jQuery's ajax function as a UInt8Array. I've based this on a related answer.
But it's not worked. When I look at the content through Wireshark, I see it's tried to do a .toString() on it, getting "[object Uint8Array]". There's very little other info on this around.
var dataCompressed = LZW.compressToByteArray(data);
$.ajax({
data: dataCompressed,
processData: false,
contentType: "application/octet-stream",
url: window.localStorage.getItem('servername') + '/Form/SaveData2?formId=' + results.rows.item(x).id,
headers: { 'Authorization': 'Basic ' + credentials },
type: "POST",
async: true,
success: function (data) {
}
});