File upload

Hello! Someone has a working example of a file upload with ionic2 ?
I found ng2-file-upload but I can’t figure how to make it works.

Thanks :wink:

2 Likes

Hi, if you are building for a device you can use this plugin https://github.com/apache/cordova-plugin-file-transfer
the tutorial on the GitHub page works flawlessly, i’m using with ionic 2 and a php upload page.

@igorls How you can use it with ionic2? Could you share an example please ?

Hi,
i have a similar problem… When i try to install the package (npm install ng2-file-upload --save) a receive this error: The package rxjs does not satisfy its siblings’ peerDependencies requirements! I try to update the rxjs package but it’s not compatible with ionic 2 beta. :frowning:

I quick fixed it by changing "rxjs": "^5.0.0-beta.6" into "rxjs": "5.0.0-beta.6" in my package.json

@igorls have you ever tried the file transfer plugin with Node JS ? Because I’ve tried for more than a week without any success. I’ve posted my problem here. If anybody could give me an hint, I would be really grateful ! :slight_smile:

Hi,
I developed a working example for Ionic2 file upload using the Transfer plugin.