lib/client/file-client/FileClient.js
function fileUpload(fileURI, serverURI, fileUploadOptions) {
  var deferred = q.defer();
  var transfer = new FileTransfer();
  transfer.upload(fileURI, serverURI, function uploadSuccess(response) {
    deferred.resolve(response);
  }, function uploadFailure(error) {
    deferred.reject(error);
  }, fileUploadOptions);
  return deferred.promise;
}
function fileUpload(fileURI, serverURI, fileUploadOptions) {
  var deferred = q.defer();
  var transfer = new FileTransfer();
  transfer.upload(fileURI, serverURI, function uploadSuccess(response) {
    deferred.resolve(response);
  }, function uploadFailure(error) {
    deferred.reject(error);
  }, fileUploadOptions);
  return deferred.promise;
}
function fileUpload ( fileURI , serverURI , fileUploadOptions ) { var deferred = q . defer ( ) ; var transfer = new FileTransfer ( ) ; transfer . upload ( fileURI , serverURI , function uploadSuccess ( response ) { deferred . resolve ( response ) ; } , function uploadFailure ( error ) { deferred . reject ( error ) ; } , fileUploadOptions ) ; return deferred . promise ; }
Handling file upload to server
Handling file upload to server