title: Ionic 3 upload multiple images with extra data
body: <p>I have an ionic 3 app; I am working on upload profile picture functionality. In this, I want to select the image from either gallery or capture image using the camera. After that, I will have two images/image_paths. I want to upload these two images along with user_id, access_token</p>
  
  <p>Select Image From Gallery
                  let option = {
                title: 'Select Picture',
                message: 'Select Least 1 Picture',
                maximumImagesCount: 1,
                outType: 0
              };</p>
  
  <pre><code>this.imagePicker.getPictures(option).then(results =&gt; {
            for (var i = 0; i &lt; results.length; i++) {
              // alert('Image URI: ' + results[i]);
              this.imageSelected = "data:image/jpeg;base64," +results[i];
              // this.imageSelected = results[i];
              let option = {
                quality: 100,
                targetHeight: 400,
                targetWidth: 400,
              };
              this.crop.crop(this.imageSelected, option).then((data) =&gt; {
                this.imageCropped = "data:image/jpeg;base64," +data;
                // alert(this.imageCropped);
                this.saveProfileImage(this.imageSelected, this.imageCropped);
              }, err =&gt; {
                this.imageCropped = '';
                alert(err);
              });
            }
          }, err =&gt; {
            this.imageSelected = '';
            alert('Error' + err);
          })
  </code></pre>
  
  <p>Select an image from the camera
              let options: CameraOptions = {
            quality: 100,
            destinationType: this.camera.DestinationType.DATA_URL,
            encodingType: this.camera.EncodingType.JPEG,
            mediaType: this.camera.MediaType.PICTURE
          }</p>
  
  <pre><code>this.camera.getPicture(options).then((imageData) =&gt; {
            // alert(imageData);
            this.imageSelected = "data:image/jpeg;base64," +imageData;
            let option = {
              quality: 100,
              targetHeight: 400,
              targetWidth: 400,
            };
            this.crop.crop(this.imageSelected, option).then((data) =&gt; {
              this.imageCropped = "data:image/jpeg;base64," +data;
              this.saveProfileImage(this.imageSelected, this.imageCropped);
            }, err =&gt; {
              this.imageCropped = '';
              alert(err);
            });
          }, (err) =&gt; {
            this.imageSelected = '';
            alert('Error' + err);
          });
  </code></pre>
  
  <p>Please see the above code and if it is right, suggest me how to write upload function with either form data or any another method</p>
  
  <p>[This is screenshot of first way i tried uploading images<a href="https://i.stack.imgur.com/SzX6Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SzX6Z.png" alt="][1]"></a></p>
  
  <p><a href="https://i.stack.imgur.com/tnYui.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tnYui.png" alt="This is a screenshot of the second way I tried uploading images"></a></p>