files/en-us/web/api/filereadersync/readasarraybuffer/index.md
{{APIRef("File API")}} {{AvailableInWorkers("worker_except_service")}}
The readAsArrayBuffer() method of the {{DOMxRef("FileReaderSync")}} interface allows to read {{DOMxRef("File")}} or {{DOMxRef("Blob")}} objects in a synchronous way into an {{jsxref("ArrayBuffer")}}. This interface is only available in workers as it enables synchronous I/O that could potentially block.
readAsArrayBuffer(blob)
blob
An {{jsxref("ArrayBuffer")}} representing the file's data.
The following exceptions can be raised by this method:
NotFoundError {{domxref("DOMException")}}
SecurityError {{domxref("DOMException")}}
NotReadableError {{domxref("DOMException")}}
EncodingError {{domxref("DOMException")}}
{{Specifications}}
{{Compat}}