Ionic File Transfer in Browser


#1

In Ionic Docs for File Transfer https://ionicframework.com/docs/native/file-transfer/ it states that it supports Browsers. However when I implement it says it requires Cordova. Can someone confirm whether File Transfer works in progressive browsers or not?


#2

It supports the cordova-browser platform.


#3

Ionic cordova platform add browser

Ionic run browser

The latter will kick off a different webserver then ionic server

Then the browser will ask permission for file write which grants quotum


#4

I would suggest (if you are starting) to drop the native file-transfer plugin and use Angular’s HttpClient instead

This plugin is getting deprecated
https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html


#5

Thanks for the responses I ended up using native javascript and angular 2


#6

please, say how and show us your code. thanks


#7

A good source on how to transfer files using native javascript and angular is the following:

https://angular.io/guide/http#listening-to-progress-events