Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

250
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!