Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Why is FileReader.onerror not called in readAsArrayBuffer on NS_ERROR_FILE_ACCESS_DENIED? (Chrome does)

  • 1 risposta
  • 1 ha questo problema
  • 3 visualizzazioni
  • Ultima risposta di guigs

more options

When reading a file via javascript readAsArrayBuffer and file is not readable, Firefox does not call "onerror" handler and instead stops the javascript with error: NS_ERROR_FILE_ACCESS_DENIED

blob = file.slice(0,1); var reader = new FileReader; reader.onerror = function(e) {

  // this is called under Chrome, but not under Firefox
  console.log('reader.onerror'); 

} reader.readAsArrayBuffer(blob); // this stops with NS_ERROR_FILE_ACCESS_DENIED

According to FileAPI it should: https://developer.mozilla.org/en-US/docs/Web/API/FileReader

When reading a file via javascript readAsArrayBuffer and file is not readable, Firefox does not call "onerror" handler and instead stops the javascript with error: NS_ERROR_FILE_ACCESS_DENIED blob = file.slice(0,1); var reader = new FileReader; reader.onerror = function(e) { // this is called under Chrome, but not under Firefox console.log('reader.onerror'); } reader.readAsArrayBuffer(blob); // this stops with NS_ERROR_FILE_ACCESS_DENIED According to FileAPI it should: https://developer.mozilla.org/en-US/docs/Web/API/FileReader

Tutte le risposte (1)

more options