【发布时间】:2019-09-06 07:21:20
【问题描述】:
我想使用 DevExtreme dxFileUploader 上传文件并在组件中处理其内容(不使用服务 url)。
我正在使用 Angular 8.2.2 和 DevExtreme 19.1。我尝试使用 onValueChange 事件处理文件,但我只获取文件的属性(文件名、文件大小等)而不是内容本身。
app.component.html:
<dx-file-uploader #fileUploader (onValueChanged)="processFile($event)"
[multiple]="false" accept="*" [(value)]="value" uploadMode="useButtons">
</dx-file-uploader>
app.component.ts:
public value: any[] = [];
processFile(e) {
console.log(this.value); // shows only file attributes
}
有没有办法从 dxFileUploader 控件访问文件内容?
【问题讨论】:
标签: angular devextreme