Binary Stream To Uint8Array - JavaScript
问题 I'm receiving the following Binary Stream from an HTTP request: HTTP REQUEST Document.get({id: $scope.documentId}, function(stream){ }); Angular Factory .factory('Document', ['$resource', 'DOCUMENTS_CONFIG', function($resource, DOCUMENTS_CONFIG) { return $resource(DOCUMENTS_CONFIG.DETAIL_URL, {}, { get: { method: 'GET', params: {}, url: DOCUMENTS_CONFIG.DETAIL_URL, isArray: false } }); } ]); Response console.log(stream) I need to convert this to a Uint8Array. I've tried to convert it to a