Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

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

  • 1 отговор
  • 1 има този проблем
  • 3 изгледи
  • Последен отговор от 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

Всички отговори (1)

more options