-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace FileTransfer plugin with HttpClient #125
Conversation
Interesting.. thanks for the PR.
|
I haven't had the opportunity to compare performance, as my current project was completely unable to build with the file-transfer dependency. But it's a good point, I might find find time to set up a project with older dependencies, so I can test file-transfer vs HttpClient. |
Performance tests weren't impressive, and a breaking change will be that image resources must have CORS headers to be loaded through xhr. You can see my comparison here: https://github.com/westphalen/ionic-image-loader-benchmark I don't know how we could improve performance. But something has to be done, since it is simply not possible to build a new Ionic project with ionic-image-loader at the moment. |
|
To answer the dependency problem:
I don't know if you can inject the --force param somehow ( |
You can try two things. Option A: use
Option B: Downgrade the File plugin
You might need to delete |
Like I said, I have other dependencies that will start complaining if I downgrade |
I agree with @westphalen. Cordova itself is recommending to use HttpClient over FileTransfer. I can't have File plugin outdated neither. I'm testing his fork and it's playing nicely on Android. |
@allanpoppe Yeah I'm thinking to just merge this and move forward in this direction. The purpose of this plugin is to (1) load images faster than alternative methods and (2) cache them. This will still keep the project on track. If I ever finish that native HTTP project, I'll implement in this plugin, and maybe make it optional (give users option between Native or HttpClient). |
Very nice @ihadeed ! |
Any news on accepting this PR this @ihadeed ? |
cordova-plugin-file-transfer deprecation #124
Tested, working, with the most recent Ionic version on Android. This should be backwards compatible with the existing @angular/common dependency, but I don't know the meaning of
trustAllHosts
, and if it needs to be implemented again.