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

256
Vistas
JavaScript w/ Cordova Camera Plugin - Convert image FILE_URI to DATA_URL

I am using the cordova-plugin-camera in order to access the camera in my hybrid app. I need to capture the photo and send it for upload as base64. When capturing a photo, I can specify the following:

destinationType: Camera.DestinationType.DATA_URL

which returns an image encoded as base64. However, DATA_URL can be very memory intensive and cause app crashes or out of memory errors (as mentioned in the plugin's documentation). Because of this, my app crashes on weaker devices, so using DATA_URL is a no-go. Using the default FILE_URI should solve this problem, but my backend is configured to only accept base64 encoded images.

My question is, is there a way to convert an image from FILE_URI to DATA_URL base64 encoding?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could download the picture from the FILE_URI and then you'd have to render the image in a canvas and then from the canvas, get the base64 using the canvas.toDataURL method.

about 4 years ago · Juan Pablo Isaza Denunciar
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