In my Ionic3 application I am calculating file size as follows.
HTML
<div>
<input type="file" accept="*" (change)="onSelect($event)">
<button ion-button (click)="calcSize()">calculate size</button>
</div>
<p>Size: </p>
TS
file: File;
size: number;
onSelect(event: any) {
this.file = event.target.files[0];
}
calcSize() {
this.size = this.file.size;
}
Above code is working perfectly on all the Android devices and iOS devices below iOS 13.2.
But when selecting videos from Photo Library on iOS devices with greater than 13.2, the size
is 0 only for video files.
But when selecting videos from iCloud Drive works fine.
Any help is highly appreciated.
Find issue on StackBlitz.
from File size is 0 only for videos in Ionic on iOS 13.2 when selecting videos from Photo Library
No comments:
Post a Comment