Sud*_*nda 5 ios ionic-framework ionic3 angular ios13.2
在我的 Ionic3 应用程序中,我计算文件大小如下。
HTML
<div>
<input type="file" accept="*" (change)="onSelect($event)">
<button ion-button (click)="calcSize()">calculate size</button>
</div>
<p>Size: {{ size }}</p>
Run Code Online (Sandbox Code Playgroud)
TS
file: File;
size: number;
onSelect(event: any) {
this.file = event.target.files[0];
}
calcSize() {
this.size = this.file.size;
}
Run Code Online (Sandbox Code Playgroud)
以上代码在 iOS 13.2 以下的所有 Android 设备和 iOS 设备上都能完美运行。
但是在 iOS 设备上从照片库中选择大于 13.2 的size视频时,只有视频文件的值为 0。
但是当从 iCloud Drive 选择视频时效果很好。
任何帮助都受到高度赞赏。
在StackBlitz上查找问题。
| 归档时间: |
|
| 查看次数: |
517 次 |
| 最近记录: |