I have an error,
Google.Apis.Requests.RequestErrorInvalid field selection filesize [400]Errors [Message[Invalid field selection filesize] Location[fields - parameter]
When I call request.Fields = "items(id,title,filesize)"; this works fine: request.Fields = "items(id,title)";
in this context,
DriveService service = new DriveService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "Drive API Sample",
});
FilesResource.ListRequest request = service.Files.List();
request.MaxResults = 100;
request.Q = string.Format("(title contains '{0}') and (mimeType contains 'image/')",filename);
request.Fields = "items(id,title)";
If I dump out the item result, it does indeed contain a filesize column, not always, for folders and some other it's null.
Anyone ran into this ? My googlefu doesn't really turn anything up...
@hreinn: Though its a very old post, but just for others to have this: In V3, this is size. So listRequest.Fields = "files(id, size)";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With