Use Google Drive API with Laravel

后端 未结 3 701
轻奢々
轻奢々 2020-12-09 00:18

I want to use the Google Drive API in my Laravel project to store PDFs. Unfortunately, the example code is for common PHP and I don\'t know how could I implement it in Larav

3条回答
  •  被撕碎了的回忆
    2020-12-09 01:07

    setTitle($datetime . $filetitle);
        $file->setDescription($filedescription);
        $file->setMimeType($mimetype);
    
        $data = file_get_contents($folder . $file_name);
    
        $createdFile = $dr_service->files->insert($file, array(
        'data' => $data,
        'mimeType' => $mimetype, //text/plain',
        'uploadType' => $uploadType
        ));
    

提交回复
热议问题