16
Mac OS XでChrome 12を使用していますが、ドキュメント内にjQuery 1.6.1が含まれています。HTML5 File API:FileReader.readAsText()は "undefined"を返します
私はテキストとしてファイルの内容を読み、以下の機能を使用してデータ・オブジェクトにそれを保存しよう:
this.upload = function(file) {
console.log('FileHandler.upload called with ' + file.name + '.');
console.log(file);
console.log(this.reader);
data = {
content: this.reader.readAsText(file)
}
console.log('Content: ' + data.content);
}
「ファイル」縫い目の有効なファイル・オブジェクトと、「このように。 reader "はFileReader型の新しいインスタンスです。
http://cl.ly/1Y2b383G2F272x1m1P0N