I am using Google Drive api's to upload the new file....While doing so, I get the following error
You cannot upload content to files of type application/vnd.google-apps.drive-sdk.
I am able to upload the file when I set the mimeType as null...If I set the mimeType as application/octet-stream, I get the above error Can anyone let me know what are the mimeTypes which can be set?? and also what does that error actually means??
TIA, VijayRaj
com.google.api.services.drive.model.File body = new com.google.api.services.drive.model.File(); body.setTitle(filename); body.setMimeType(<mimetype>); FileContent mediaContent = new FileContent(<mimetype>, file); resultFile = service.files().insert(body, mediaContent).execute();
– VijayRaj