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

252
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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