I'm developing an application and this application receives some media files (videos, photos and audios) so I'm using the media capture , but when the user takes a photo for example it generates a random name, something like this 145938172015.jpg
, would like anyone to see something like that in imagem01.jpg
place. Below is my code that I use for image capture.
foto: function () {
navigator.device.capture.captureImage(app.captureFotoSuccess, app.captureFotoError, { limit: 1 });
},
captureFotoSuccess: function (mediaFiles) {
var i = 0;
document.getElementById('ArquivosAnexados').value = document.getElementById('ArquivosAnexados').value + mediaFiles[i].fullPath + '; ';
},
captureFotoError: function (error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
},