Q: ionic 2 upload file object to server I have to upload an image as a file, to the server, by passing the file through a parameter called 'picture'.
Here is my code. 
imageUpload(){ 
        let actionSheet = this.actionSheetCtrl.create({
            title: 'Select Image Source',
            buttons: [
            {
                text: 'Load from Library',
                handler: () => {
                    this.image11(this.camera.PictureSourceType.PHOTOLIBRARY);
                }
            },
            {
                text: 'Use Camera',
                handler: () => {
                    this.image11(this.camera.PictureSourceType.CAMERA);
                }
            },
            {
                text: 'Cancel',
                role: 'cancel'
            }
            ]
        });
        actionSheet.present();
    }

and this is my upload function: 
       correctPath:any
       currentName:any


       image11(sourceType) {

        // Create options for the Camera Dialog
        var options = {
            quality: 100,
            sourceType: sourceType,
            saveToPhotoAlbum: false,
            correctOrientation: true,
            destinationType: 1
        };
        this.camera.getPicture(options).then((imagePath) => {

            console.log ('image path ' + imagePath)

            //need to handle special cases in Android 
            if (this.platform.is('android') && sourceType === this.camera.PictureSourceType.PHOTOLIBRARY) {
                this.filePath.resolveNativePath(imagePath)
                .then(filePath => {
                    console.log ('file path is ' + filePath)
                    this.correctPath = filePath.substr(0, filePath.lastIndexOf('/') + 1);
                    this.currentName = imagePath.substring(imagePath.lastIndexOf('/') + 1, imagePath.lastIndexOf('?'));
                });
            } else {
                this.currentName = imagePath.substr(imagePath.lastIndexOf('/') + 1);
                this.correctPath = imagePath.substr(0, imagePath.lastIndexOf('/') + 1);
            }



            (<any>window).resolveLocalFileSystemURL(imagePath, (fileEntry) => {

                fileEntry.file((resFile) => {

                    var reader = new FileReader();
                    reader.onloadend = (evt: any) => {
                        var imgBlob: any = new Blob([evt.target.result], { type: 'image/jpeg' });
                        console.log (JSON.stringify(imgBlob) + 'blob')

                    };

                    reader.onerror = (e) => {
                        console.log('Failed file read: ' + e.toString());

                    };

                    console.log (JSON.stringify(resFile)  +'res file')
                    reader.readAsArrayBuffer(resFile);


                    let options1: FileUploadOptions = {
                        fileKey: "file",
                        fileName: this.currentName,
                        chunkedMode: false,
                        mimeType: "multipart/form-data",
                        params:{picture:resFile}
                    }

                    const fileTransfer: TransferObject = this.transfer.create();

                    fileTransfer.upload(resFile.localURL, "http://jhp-dev-har2vey.codeanyapp.com/jhp/public/index.php/api/upload", options1).then(data => {
                        console.log ( "data at file upload " + JSON.stringify(data))
                    }, err => {
                        console.log (JSON.stringify(err) + 'fileupload error')
                    });
                }, (err)=>console.log ('error at file entery ' + JSON.stringify(err)));

            });//window 

        }, (err) => {
            console.log ('erroar at getting picture ' + JSON.stringify(err))
        })//camera imagepath
       }

It's not passing in the actual file, instead its passing in a string that contains the file name, location, and ect. 
