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

209
Vistas
Uploading file in react.js and material ui tool

I'm trying to use material UI upload button, to allow my users to upload profile images, so it looks like this:

<label htmlFor='icon-button-file'>
              <Input accept='image/*' id='icon-button-file' type='file' onChange={handleCaptureChange('profileImg')} />
              <IconButton
                color='secondary'
                aria-label='upload picture'
                component='span'
                
              >
                <StyledUploadButton />
              </IconButton>
            </label>

and this:

const handleCaptureChange = (prop: keyof State) => (event: React.ChangeEvent<HTMLInputElement>) => {
        setValues({
            ...values, 
            [prop]: event.target.value
        })
    }

the URL I receive whenever I tries it, and select an image will be like this: C:\fakepath\b062f046-fcb5-4c99-bd19-1fff9c11efed.jpg and this image is on my desktop, that's weird, how should I get the right location of the image?

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