Saving files on a mobile device with the same download behavior

I have Blob in memory (obtained via WebRTC DataChannel), and I need to save it as a file on a mobile device (mainly on Android, but, if possible, on iOS).

I am currently using cordova-file-plugin so that the user can select the destination folder to save.

I would like to avoid the choice of folders (which opens the modal structure of folders) when saving a file, just like when downloading from a server (or the App Store).

Therefore, I am looking for a plugin (or other solution) that may include saving the file in the same way as downloading from the site:

  • save default download folder
  • in the notification area with some animation
  • link to file with notification click

I have already tried cordova-plugin-file-transfer in combination with HTML and DataURL bindings, but when saving relatively large files there are memory problems.

+4
source share

Source: https://habr.com/ru/post/1625148/


All Articles