From ed1122c580f9d150c7b3ffae56d21ceef697ab71 Mon Sep 17 00:00:00 2001 From: Jason Hitesman Date: Tue, 27 Sep 2022 15:54:33 -0700 Subject: [PATCH] Correctly define array - not multidimensional array --- drive/snippets/drive_v3/src/DriveUploadBasic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive/snippets/drive_v3/src/DriveUploadBasic.php b/drive/snippets/drive_v3/src/DriveUploadBasic.php index 5706834..c8253b3 100644 --- a/drive/snippets/drive_v3/src/DriveUploadBasic.php +++ b/drive/snippets/drive_v3/src/DriveUploadBasic.php @@ -28,11 +28,11 @@ function uploadBasic() $fileMetadata = new Drive\DriveFile(array( 'name' => 'photo.jpg')); $content = file_get_contents('../files/photo.jpg'); - $file = $driveService->files->create($fileMetadata, array([ + $file = $driveService->files->create($fileMetadata, array( 'data' => $content, 'mimeType' => 'image/jpeg', 'uploadType' => 'multipart', - 'fields' => 'id'])); + 'fields' => 'id')); printf("File ID: %s\n", $file->id); return $file->id; } catch(Exception $e) {