Cannot Submit FormData


I am trying to submit formdata but still it doesn’t work. I am not sure what is going wrong…

       let url = AppSettings.API_ENDPOINT + 'chatPostDirectMessage';
		let headers = new Headers();
        headers.append('Content-Type', 'multipart/form-data');

        let body = new FormData();
        body.append('receieverId', receieverId);
        body.append('text', text);
        if(attachment) {
            body.append('attachment', attachment);

		return, body, {
            headers: headers
        .map(res => {
            return res.json();


FormData is not supported at this moment, use nativescript-background-http plugin for file uploads.


Alright. i thought it was…


Eventually i created my own plugin to do so. Here is it on github