将文件从服务器下载到Ionic2 App [英] Download file from server into Ionic2 App

查看:99
本文介绍了将文件从服务器下载到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

这篇关于将文件从服务器下载到Ionic2 App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆