Ionic File-transfer (cordova) Set content-type to param's value

I have to upload a file with some non-binary data, and set content-type for each field is required.

There is the upload method and it has a params parameter, where you can send an object of params.

upload(fileUrl: string, url: string, options?: FileUploadOptions, trustAllHosts?: boolean): Promise<FileUploadResult>;

Can I set content-type (as from postman example) to each param?

enter image description here

Leave a Comment