Tag: file transfer

Upload cordova file transfer

Como subir un fichero desde cordova con file transfer $(‘.take-foto’).on(‘click’,function(){ var options = { encodingType: 0, quality: 60, destinationType: Camera.DestinationType.FILE_URI, correctOrientation: true, targetWidth: 4000, targetHeight: 3000 }; navigator.camera.getPicture(uploadFileTransfer, onFailCamara, options); }) function uploadFileTransfer(imageURI){ winUpload = function(r){ var data = JSON.parse(r.response); // Si la respuesta del servidor es json console.log(data); navigator.camera.cleanup(function(){},function(){}); }; failUpload = function(error){ console.log(error) Read More