Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

129
Vistas
passing image files in post request parameter of JavaScript and then getting that image info in php

I am sending array of images and some text from javascript ajax function to php file and i can read text parameters but i cannot read image file parameters in php code how can i do that? Javascript code '''

formdata.append("file",img[i]);

xhttp.send("itemname="+itemname+"&category="+category+"&color="+color+"&price="+price
    +"&image="+formdata+"&brandname="+brandname+"&attributes="+attributes+"&smalldescp="+smalldesp
    +"&longdescp="+largedescp+"&warentyyear="+warentyyr+"&warentydescp="+warentypolicydescp+"&length="+pkglen
    +"&width="+pkgweight+"&height="+pkgheg);'''

Php Code '''

 $itemname = $_POST["itemname"];
   $category = $_POST["category"];
   $color = $_POST["color"];
   $price = $_POST["price"];
   $image =$_POST["image"];
   $brandname = $_POST["brandname"];
   $attributes = $_POST["attributes"];
   $smalldescp = $_POST["smalldescp"];
   $longdescp = $_POST["longdescp"];
   $warentyyear = $_POST["warentyyear"];
   $warentydescp = $_POST["warentydescp"];
   $length = $_POST["length"];
   $width = $_POST["width"];
   $height = $_POST["height"];
     
     echo json_encode($image->$_FILES['file']['name'][0]);

'''

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda