I am not using sdk of google drive I want to upload a file on my google drive account thr my app for which I have used post api to which I have set url,headers,filename.But I get error as 'Bad content type.Use multipart'. My code is as follows-
File file = new File(fileName);
String url = "https://www.googleapis.com/upload/drive/v2/files/" + file.getName() + "?uploadType=multipart&access_token=" + accessToken;
headers.put("Content-type", "multipart/related");
response = GlobalConstants.SERVICE_CLIENT.Execute(url, "post", file, headers); //call to post.
Please do help at ur earliest Thnx in advance