Uploading photo with HTML5 and PHP input

2

I'm using the new method of uploading photos where to use the mobile phone it opens the camera and if you use a computer it opens the files ... however if you try to upload the photo by the phone it just does not happen, different of if I do upload by computer, it does normally, could anyone help me?

HTML

<input type="file" name="foto" accept="image/*" capture>

PHP

$foto = $_FILES['foto']['tmp_name'];
$foto_nome = Limpar($nome_vinho).'-'.$safra.'-'.$vinicola;
$local = "assets/uploads/vinhos/";
$extensao = strtolower(substr($_FILES['foto']['name'],-4));
$final = $local.$foto_nome.'.'.$extensao;

move_uploaded_file($foto, $final);
    
asked by anonymous 19.06.2018 / 15:01

0 answers