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

219
Visualizações
Flow js + React - upload image on button click

Hopefully someone can help with this.

We are using Flow js library for file upload - https://www.npmjs.com/package/@flowjs/flow.js. Requirement:

  1. Inside a Popover, upload an image, the image should be uploaded to the server only on button click.
  2. In second scenario, inside a Popover, upload an image and crop the image and the cropped image should be uploaded to the server on button click.

We have tried

Scenario 1 :

Added an input which accepts images

<input className="inputfile" type="file" accept="image/\*" onChange={onUploadFile} />

//onUpload - storing the image in a state variable.

 const onUploadFile = (event: any) => {
    if (event.target.files && event.target.files.length > 0) {
      fileReader.addEventListener('load', () => setImage(fileReader.result));
      fileReader.readAsDataURL(event.target.files[0]);
    }
  };

How is it possible to upload this file to server on a submit button click. Is there any way we can trigger the flow.on methods on this submit button click.

Scenario 2 : Same as above, additional crop functionality is added. For that using react-image-crop library.

Using this library we get the crop image as a blob. How to upload that to server on a submit button click.

Any response would help me, Thanks in advance

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