code property

[Internet Explorer 10. This object was supported in pre-release versions of Internet Explorer 10. As of Internet Explorer 10, it is obsolete and DOMError should be used instead. Applications using this object should be updated accordingly.]

Returns a file error code.

This property is read-only.


errorCode = object.code


Property values

Type: Number

Returns a file error code as shown in the Remarks section.


The code property returns one of the following file error codes.

NOT_FOUND_ERR 8The File or Blob could not be found at the time the read was processed.
SECURITY_ERR 18 A file error not covered by the other file error codes occurred, such as:
  • Too many read calls are being made on File or Blob resources.
  • The file has changed on disk since the user selected it.
  • Certain files are unsafe for access within a web application.
ABORT_ERR 20The read operation was aborted, typically with a call to abort.
NOT_READABLE_ERR4The File or Blob cannot be read, typically due to permission problems that occur after a reference to a File or Blob has been acquired (that is, concurrent lock with another application).
ENCODING_ERR5The length of the data URL for a File or Blob is too long.


The above error codes have been replaced with the following error strings.

  • NotFoundError
  • SecurityError
  • AbortError
  • NotReadableError
  • EncodingError

See FileError for a code example using these standards compliant error strings.

See also