public void FileStateChange() { if (webFile.State == StateType.Error) { errored = true; if (callBack != null) { callBack.Invoke(this); } } else if (webFile.State == StateType.Received) { Blob mainBlob = webFile.GetBlob(); ReadFromBlob(mainBlob); } }
private void ReadFromBlob(Blob blob) { sourceBlob = blob; FileReader chunck = new FileReader(); chunck.OnLoadEnd = delegate(System.Html.Data.Files.FileProgressEvent e) { ReadFromBin(new BinaryReader(new Uint8Array(chunck.Result))); if (callBack != null && parseSuccessful) { callBack.Invoke(this); } }; chunck.ReadAsArrayBuffer(blob); }