You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/03/02 14:27:30 UTC

[GitHub] [cordova-plugin-file] breautek commented on issue #364: Large file save freeze app for seconds

breautek commented on issue #364: Large file save freeze app for seconds
URL: https://github.com/apache/cordova-plugin-file/issues/364#issuecomment-593428464
 
 
   > I think i cant make cordova calls from worker
   
   You are correct, this is something that cordova doesn't currently support.
   
   > so i need to pass my file to worker, convert it to base64 in worker, pass it back to main and call save()
   
   You can try this, but I'm not certain if that will help as there is a bottleneck of copying the data to and from the worker.
   
   If you're downloading a file and saving it to disk, you're best/quickest work around is probably using the [File Transfer Plugin](https://github.com/apache/cordova-plugin-file-transfer) despite it being deprecated. Because it downloads the file and saves it to the filesystem all on the native side. 
   
   The primary reason why the transfer plugin is deprecated to my understanding is because it is possible to download binary files using `XMLHttpRequest` (however, then you can run into performance/efficiency issues like you are currently experiencing). Despite the plugin is being deprecated, I still use it to upload large files to my server, and that part is at least working for me still.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org