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

220
Vistas
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 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