Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

67
Vistas
How do you upload a picture to the database taken from a smartphone's camera with php?

My website allows users to upload images. The upload functionality works perfectly, as long as there is a file to choose. However, when I access my website on my iPhone, and try to upload a photo, I'm given choices of choosing a file, or taking a photo with the iPhone camera. When I choose the option of taking a photo, my website crashes. Can someone help me with this?

Here's the input code:

<input id="uploadStatus" type="file" name="photo" accept="image/*" onchange="loadFileStatus(event)" hidden>

And here's the javascript code:

    reader.onload = function(){
      var output = document.getElementById('outputstatus');
      output.src = reader.result;
    };
    reader.readAsDataURL(event.target.files[0]);
}; ```

Thank you in advance.
7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos