Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- decompiler
- 자바
- Android
- 컬럼명
- MSsql
- Redirect
- STS
- Web Service
- asp.net
- SpringSource Tool Suite
- MS-SQL
- C#
- WebView
- html
- 안드로이드
- scrollView
- varags
- 웹뷰
- TextBox
- 웹 서비스
- Bootstrap
- Java
- 자바스크립트
- javascript
- Maven
- Eclipse
- jsp
- 이클립스
- MANTIS
- Apache Lucene
Archives
- Today
- Total
bboks.net™
Ionic production 빌드 후 FileReader.onload 먹통 현상 본문
Ionic production 빌드 후 잘되던 FileReader의 onload가 안됨
구글링 해보니 나와 같은 현상을 겪은 사람들 발견
아래와 같이 처리
기존코드
const file = event.target.files[0];
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => {
console.log(reader.result);
};
수정버전
const file = event.target.files[0];
let FileReader: new() => FileReader = ((window as any).FileReader as any).__zone_symbol__OriginalDelegate;
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => {
console.log(reader.result);
};
[참고]
FileReader.onLoad/onLoadEnd event argument has no target.result property