google-api-php-client
google-api-php-client copied to clipboard
Undefined index: type in ..\vendor\google\apiclient\src\Service\Resource.php:281
Hi I'm getting undefined index 'type' and 'location' when trying to upload a 2MB csv file to Google Drive but I can't find any docs about 'type' and 'location' parameters.
$driveService = $this->getDriveInstance();
$fileMetadata = new \Google\Service\Drive\DriveFile(array(
'parents' => array('xxxxxxxxx')
));
$file = $driveService->files->create($fileMetadata, array(
[
'data' => $stringContent,
'mimeType' => 'text/csv',
'uploadType' => 'media',
]
));
Thanks!
@arlequin99 could you please pass the error log and the stack trace?
i have the same error, How can I be sure that the connection was successful?