{{ obsolete_header() }}
Represents an error that occurs while using the {{ domxref("FileReader") }} interface. Obsolete per latest specification. Use {{ domxref("DOMError") }} instead.
Properties
Property | Type | Description |
code | unsigned short | The error code. |
Error codes
Constant | Value | Description |
ABORT_ERR | 3 | The file operation was aborted, probably due to a call to the FileReader abort() method. |
ENCODING_ERR | 5 | The file data cannot be accurately represented in a data URL. |
NOT_FOUND_ERR | 1 | File not found. |
NOT_READABLE_ERR | 4 | File could not be read. |
SECURITY_ERR | 2 | The file could not be accessed for security reasons. |
Gecko-specific implementation notes
- The FileError interface has been removed starting with Gecko 13 {{ geckoRelease("13.0") }}. Instead the more general {{ domxref("DOMError") }} interface is used and returned by {{ domxref("FileReader", "FileReader.error") }}.
See also
- {{ domxref("FileReader") }}
- {{ domxref("File") }}
- {{ domxref("Blob") }}
- {{ spec("https://www.w3.org/TR/FileAPI/#ErrorAndException", "Specification: FileAPI Errors and exception", "WD") }}
{{ languages( {"zh-cn": "zh-cn/DOM/FileError" } ) }}