Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!