I upload an image to Google Drive using the Objective-C SDK, and this morning I get this error after the download is complete:
2013-02-20 13: 07: 30.565 Transmission [1774: 907] <0x1fab2b40 GDriveDataSource.m: (165)> An error occurred: Domain error = com.google.GTLJSONRPCErrorDomain Code = 400 "Operation could not be ( Unsupported content with type : application / json-rpc; charset = utf-8) "UserInfo = 0x1fcc0690 {error = Unsupported content with type: application / json-rpc; charset = utf-8, GTLStructuredError = GTLErrorObject 0x1fcbfcc0: {message: "Unsupported content with type: application / json-rpc; charset = utf-8": 400 data: [1]}, NSLocalizedFailureReason = (Unsupported content with type: / json-rpc; charset = utf-8)}
My code has been running for many days and I have not changed recently. I definitely set the correct mime type in the boot options parameter. Here is the relevant piece of code:
GTLDriveFile *file = [GTLDriveFile object];
file.title = asset.fileName;
file.mimeType = @"image/jpeg";
NSData *imageData = [asset getImageDataForResolutionType:resType];
GTLUploadParameters *uploadParameters = [GTLUploadParameters uploadParametersWithData:imageData
MIMEType:file.mimeType];
GTLQueryDrive *query = [GTLQueryDrive queryForFilesInsertWithObject:file
uploadParameters:uploadParameters];
Thank!