Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

462
Visualizações
How to convert local image path to url

I am fairly new to React, and is trying to convert an local image file path to a data url or blob url that can be used in the src.

import image from "./img1.jpeg" will not work for my case because the image file will only be created after some user interaction that will trigger the backend processing script.

I have an idea of creating a hidden upload field and upload the image then convert it to URL with URL.createObjectURL(e.target.files[0]) but I have no knowledge in doing that...

Since @quentin stated that I should convert the file path to URL in server-side code(expressjs), how can I do the conversion?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda