requestFileSystem在Chrome上确定,但在Safari7和移动Chrome/Safari上未定义

mic*_*ael 6 safari html5 mobile-safari mobile-chrome

我正在尝试FileReader.readAsDataURL(file)在移动设备上测试HTML5 FileReader API ,但我遇到了问题.它在桌面Chrome中运行良好,但在Safari和移动Chrome/Safari中失败

我正在使用这一行: window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem // window.requestFileSystem is undefined on Safari and mobile

有没有我不使用的技巧或设置?

fer*_*sik 4

此 API 已弃用。看看 Eric Bidelman 的这篇文章:

http://www.html5rocks.com/en/tutorials/file/filesystem/

另请查看兼容性:

http://caniuse.com/#feat=filesystem