0

Colegas.

Tenho um web-based system desenvolvido em PHP e esse sistema é compatível mobile. Quando clico no campo file, ele dá a opção de usar a câmera, porém quando tiro uma foto, ele atualiza a página e não aparece no campo a foto tirada. Isso é possível? Se for, alguém poderia ajudar? Obrigado.

1 Resposta 1

0

Esse post é bem parecido com o seu. Dê uma olhada.

https://stackoverflow.com/questions/17241707/using-form-input-to-access-camera-and-immediately-upload-photos-using-web-app

<input id="myFileInput" type="file" accept="image/*;capture=camera">

var myInput = document.getElementById('myFileInput');

function sendPic() {
  var file = myInput.files[0];

  // Send file here either by adding it to a `FormData` object 
  // and sending that via XHR, or by simply passing the file into 
  // the `send` method of an XHR instance.
}

myInput.addEventListener('change', sendPic, false);

Você deve fazer log-in para responder a esta pergunta.