Upload photo with HTML5 and PHP input camera

Asked

Viewed 529 times

2

I’m using the new method of uploading photos where to use the phone he opens the camera and if using a computer he opens the files... but if I try to upload the photo by cell phone it just doesn’t happen, unlike if I upload it by computer, he does normally, someone could 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);
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.