I can upload regular files. No problem here.
I get an error when updating existing files
I added ‘uploadType’ => ‘multipart’ and it gave an error again.
There is a ".htaccess
" file in the directory and it says "deny from all
" in its content.
I delete it from the ".htaccess" drive and it gives an error in another file.
An example error message:
GoogleServiceDriveResourceFiles->update( $fileId = '1ouvREdK6mJSOu_AqGyffcuwFvmvHM4Ar', $postBody = NULL, $optParams = 'deny from all', [] )
Error in another file shows file content
second line gives error
$content = file_get_contents($filePath); $service->files->update($existingFile->getId(), null, $content, []);
I am using a Google Drive Service Account
and I am using the php 8.2 version library
2
Answers
My English is very poor.
My full code is below.
Loading a directory and all its contents, even subdirectories and subfiles, works smoothly.
The problem here is:
Error while overwriting existing file, cannot overwrite existing file.
`// Folder and sub-content loading function
enter image description here
I solved the error of overwriting the existing file as follows.
It didn’t give an error, but did it actually overwrite the file?