Reading binary files in jQuery isn't particulary hard. There are two things really that we have to do. The first one is change the dataType
to binary
and the second one is setting the processsData
to false
.
1 2 3 4 5 6 7 8 9 |
$.ajax({ url: "/data/some.mp3", type: "GET", dataType: "binary", processData: false, success: function(result) { //process your data here } }); |