Google drive api Googledrive API通过PHP上传文件返回错误

Google drive api Googledrive API通过PHP上传文件返回错误,google-drive-api,Google Drive Api,无法通过PHP将任何文件上传到Google Drive Cloud, 另一个进程列出文件,子进程监听,文件详细信息fork fine $client = new Google_Client(); $client->setApplicationName("File Upload Testing"); $client->setClientId('myID'); $client->setClientSecret('mySecret'); $client->setScopes(

无法通过PHP将任何文件上传到Google Drive Cloud, 另一个进程列出文件,子进程监听,文件详细信息fork fine

$client = new Google_Client();
$client->setApplicationName("File Upload Testing");
$client->setClientId('myID');
$client->setClientSecret('mySecret');
$client->setScopes(
    array(
        "https://www.googleapis.com/auth/drive",
        "https://www.googleapis.com/auth/drive.file",
        "https://www.googleapis.com/auth/drive.appdata",
        "https://www.googleapis.com/auth/drive.apps.readonly",
    ));

    $parent = new Google_Service_Drive_ParentReference();
    $parent->setId("0B1OLO5r_T5znT3dRTUdNNGVxdms");

    $file = new Google_Service_Drive_DriveFile();
    $file->setParents(array($parent));
    $file->setTitle("File.png");
    $file->setDescription("File pnd desc");
    $file->setMimeType("image/png");

    $content = file_get_contents('images/resim.jpg');

    try{
       $file = $service->files->insert($file, array(
           'data' => $content,
           'mimeType' => 'image/png',
           'uploadType' => 'multipart',
           'fields' => 'id'));
        printf("File ID: %s\n", $file->id);
    } catch( Execution $e){
       echo $e->getMessage();
    }
图像路径正确!,wenn i从数组文件中删除数据,上载过程成功但未清空内容,使用数据参数,返回始终404未找到!, 我找不到这个问题,你知道吗