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

255
Vistas
Ionic 2 image capture in different folder upload with 1 hit

I am creating an App where I want to capture different image on different folder and there are some data in the form too. So I want to upload all in single API Hit. I am facing following issue:- 1. How I can capture different image in different folder (folder is fixed) 2. How to send with that api. My Required image is as following enter image description here

I tried with

    pickPicture(){
  Camera.getPicture({
      destinationType: Camera.DestinationType.DATA_URL,
      sourceType     : Camera.PictureSourceType.PHOTOLIBRARY,
      mediaType: Camera.MediaType.PICTURE
  }).then((imageData) => {
    // imageData is a base64 encoded string
      this.base64Image = "data:image/jpeg;base64," + imageData;
  }, (err) => {
      console.log(err);
  });
}

But here I am not able to show different images in different folder.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

There is a hint . You should put any id on pickPicture(){} like pickPicture('img1'){}on click on button and then pass that id to match the name and same with different id.

public pickPicture(myurl) {
    //console.log("inside take picture "+myurl);
     Camera.getPicture({({
       destinationType: Camera.DestinationType.DATA_URL,
  sourceType     : Camera.PictureSourceType.PHOTOLIBRARY,
  mediaType: Camera.MediaType.PICTURE
    }).then(imageData => {
      console.log(myurl);
      if(myurl=="Image1"){
        this.Image1 = "data:image/jpeg;base64," + imageData;
      }else if(myurl=="Image2"){
        this.Image2 = "data:image/jpeg;base64," + imageData;
      }});
over 4 years ago · Santiago Trujillo 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