0
Google에서 appProperties를 설정하는 방법 PHP에서 드라이브 api? 내가 그 정도 익숙하지 해요드라이브 API 설정 appProperties
Google에서 appProperties를 설정하는 방법 PHP에서 드라이브 api? 내가 그 정도 익숙하지 해요드라이브 API 설정 appProperties
..
$file->setAppProperties(array('projecto' => 'xpto'));
파일을 만들 수 있지만 설정 속성을 해달라고 :
$file->setAppProperties(array(array('projecto' => 'xpto')));
나이 :
$file = new Google_Service_Drive_DriveFile();
$file->setName($f->getFilename());
$file->setMimeType(mime_content_type($f->getPathname()));
$file->setParents(array($dest));
$object = new stdClass();
$object->projecto = 'xpto';
$file->setAppProperties($object);
$data = file_get_contents($f->getPathname());
$createdFile = $driveService->files->create($file, array(
'uploadType' => 'multipart',
'data' => $data
));
나는이 시도 PHP 구문을 사용하지만 setAppproperties
이 JSON 객체인지 확인하십시오. the documentation에는 요청하는 응용 프로그램에서 설정할 수있는 키 쌍 값이 표시되어 있습니다. API 탐색기에서도 이와 같이 형식이 지정됩니다.
는드라이브 API를 사용하여 드라이브 파일에 고유 한 속성을 추가 할 수 있습니다. 이러한 속성은 드라이브 파일에 키/값 쌍으로 저장됩니다.
create
가 호출되고 나면 기본적으로
appProperties
응답 오브젝트의 일부가 아닌 참고 마십시오. 응답의 일부가되도록
fields
호출에 지정해야합니다.