Skip to content
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

chore: remove deprecated file transfer plugin #634

Merged
merged 1 commit into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tests/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
<name>Cordova Camera Plugin Tests</name>
<license>Apache 2.0</license>

<dependency id="cordova-plugin-file-transfer" />

<js-module src="tests.js" name="tests">
</js-module>
</plugin>
26 changes: 1 addition & 25 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
*/

/* globals Camera, resolveLocalFileSystemURL, FileEntry, CameraPopoverOptions, FileTransfer, FileUploadOptions, LocalFileSystem, MSApp */
/* globals Camera, resolveLocalFileSystemURL, FileEntry, CameraPopoverOptions, LocalFileSystem, MSApp */
/* eslint-env jasmine */

exports.defineAutoTests = function () {
Expand Down Expand Up @@ -167,26 +167,6 @@ exports.defineManualTests = function (contentEl, createActionButton) {
};
}

function uploadImage () {
var ft = new FileTransfer();
var options = new FileUploadOptions();
options.fileKey = 'photo';
options.fileName = 'test.jpg';
options.mimeType = 'image/jpeg';
ft.onprogress = function (progressEvent) {
console.log('progress: ' + progressEvent.loaded + ' of ' + progressEvent.total);
};
var server = 'http://sheltered-retreat-43956.herokuapp.com';

ft.upload(pictureUrl, server + '/upload', win, fail, options);
function win (information_back) {
log('upload complete');
}
function fail (message) {
log('upload failed: ' + JSON.stringify(message));
}
}

function logCallback (apiName, success) {
return function () {
log('Call to ' + apiName + (success ? ' success: ' : ' failed: ') + JSON.stringify([].slice.call(arguments)));
Expand Down Expand Up @@ -498,10 +478,6 @@ exports.defineManualTests = function (contentEl, createActionButton) {
writeImage();
}, 'write');

createActionButton('Upload Image', function () {
uploadImage();
}, 'upload');

createActionButton('Draw Using Canvas', function () {
displayImageUsingCanvas();
}, 'draw_canvas');
Expand Down