Try to search your question here, if you can't find : Ask Any Question Now ?

out of memory error when calling readAsArrayBuffer method on FileReader of the cordova-plugin-file (iOS)

HomeCategory: stackoverflowout of memory error when calling readAsArrayBuffer method on FileReader of the cordova-plugin-file (iOS)
Avatarpragati asked 5 months ago

On iOS I’m trying to upload videos to my own website and to do so I use the FileReader.readAsArrayBuffer method with a chunkSize of 1048576.

I upload chunks when the onprogress event fires and all of this actually works perfect except for bigger files. When trying to upload a file of 1.33GB i’m getting a out of memory exception when calling the readAsArrayBuffer method.

I guess this is because it’s trying to reserve memory for the complete file, however this is not necessary. Is there a way to read a binary chunk from a file without it reserving memory for the complete file? or are there other solutions?

Thanks!

1 Answers
Best Answer
AvatarMikhail answered 5 months ago
Your Answer

16 + 14 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com