VijayRaj
VijayRaj

Reputation: 425

Error while uploading a file using java

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

Upvotes: 2

Views: 1127

Answers (1)

Vic Fryzel
Vic Fryzel

Reputation: 2375

I suspect you are getting this error because you did not register the MIME type application/octet-stream as a MIME type of your application in the Google APIs Console project. If you update those settings with the correct MIME type(s) and extensions, this should work fine. The code from your comment seems correct.

Upvotes: 1

Related Questions