diff --git a/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js b/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js index 79c8a5d6..1596de71 100644 --- a/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js +++ b/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js @@ -349,7 +349,9 @@ define([ type: 'POST', headers: {"Authorization": "Bearer " + JSON.parse(sessionStorage.getItem("session")).token}, contentType: 'application/json', - dataType: 'text', + xhrFields: { + responseType: "blob" // to avoid binary data being mangled on charset conversion + }, data: "{}", success: function(response){ responseDataUrl = URL.createObjectURL(new Blob([response], {type: "octet/stream"}));