Open diachedelic opened 4 years ago
See #22.
Hi there. I'm working in an app that has to write large volumes of data which are received via streaming. Since I can't store all the data in memory, I can't use write_blob
. I was wondering if I could use this library but I saw that it doesn't have an append
method 😞
I wanted to know if you are thinking of implementing the append
feature? Or if there is any workaround for my use case?
I found capacitor-file-chunk package that looks promising and uses this lib as a base code.
This plugin builds on the original concept and code of the Capacitor Blob Writer plugin by providing the ability to read and write files in chunks, offering improved performance compared to the Capacitor Filesystem plugin. It enables direct communication and exchange of binary data with a localhost web server, eliminating the need for base64 conversion.
I'll give a try to it.
Wow, I did not know about that plugin. Amazing!
Have you tried using write_blob
? My understanding is that browsers flush Blobs to disk when there is insufficient memory available, so in theory this plugin should work for huge files.
That won't work for me since I don't have the entire file in memory. I need to write as the chunks arrive. In case anyone has the same problem capacitor-file-chunk package did the trick! 🥳
You use case shows that this plugin should support appending.
I have no idea when that will be implemented, though. I'm glad the File Chunk plugin worked for you.
It would be good to be able to append to a file - then we could write even bigger files!