I'm trying to upload a file to Google Drive using the the v3 Google Drive SDK:
$this->drive()
->files
->update(
$this->report->getId(),
$this->report, // This is a Google_Service_Drive_DriveFile instance
[
'uploadType' => 'multipart',
'data' => file_get_contents($this->getLocalReportLocation())
]
);
And I receive the following exception:
Error calling PATCH https://www.googleapis.com/upload/drive/v3/files/ABCDe4FGHvXZTKVOSkVETjktNE0?uploadType=multipart: (403) The resource body includes fields which are not directly writable.
data
extra parameter? – Matteo Tassinaridata
parameter causing it. Will edit the question. – siannoneupdate
method? – Matteo Tassinaripublic function update($fileId, Google_Service_Drive_DriveFile $postBody, $optParams = array())
– siannone