文件阅读器API在Safari中无法正常工作,但在chrome中工作正常

File Reader API not working as expected in Safari, but working fine in chrome

本文关键字:工作 常工作 chrome 但在 API Safari 文件      更新时间:2023-09-26

我使用的是safari版本8.0.5。上传文件时,file.onload运行良好。

在持续的过程中,如果我打开文件,做一些更改,然后再次点击上传文件按钮,该文件在safari中不会被读取,但使用chrome可以很好地工作。

我看到的console.log错误是找不到文件

希望我定义了这个问题。

编辑-1

我想我混淆了我的文字

readFile = new FileReader();
readFile.onload = function(){
// working fine on first hit. But not working if i do changes in my file using editor.
}
readFile.error = function(){
// this is called after i make changes in my file with notepad. The error says file not found.
}

Safari 8是否支持FileReaderFile构造函数?

canouse.com表示不支持File