将文件从服务器下载到Ionic2 App

将文件从服务器下载到Ionic2 App

问题描述:

我需要在我的Ionic2应用程序中实现一项功能,用户可以将特定的视频文件下载到Ionic2应用程序中.

I am in need to implement a feature in my Ionic2 app where users can download a specific Video file into Ionic2 app.

检查Ionic Native部分后,我发现可以使用以下插件:

Upon checking the Ionic Native section, I found that the following plugins available :

  • 文件
  • 文件选择器
  • 文件打开器
  • 文件路径

但找不到任何内容,例如' cordova-plugin-file-transfer ",其中的特定方法为 DOWNLOAD .

But could not find anything such as 'cordova-plugin-file-transfer' where a specific method exists as DOWNLOAD.

出路是什么?

请提出建议.

您可以使用 为此转移 本机插件.

You can use Transfer native plugin for that.

此插件可让您上传和下载文件.

This plugin allows you to upload and download files.

Git存储库.

 ionic plugin add cordova-plugin-file-transfer
 npm install --save @ionic-native/transfer