Method: files.export
Google Workspace 문서를 요청된 MIME 유형으로 내보내고 내보낸 바이트 콘텐츠를 반환합니다. 내보내는 콘텐츠는 10MB로 제한됩니다.
HTTP 요청
GET https://www.googleapis.com/drive/v3/files/{fileId}/export
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
fileId |
string
파일의 ID입니다.
|
쿼리 매개변수
매개변수 |
mimeType |
string
필수 항목입니다. 이 내보내기에 요청된 형식의 MIME 유형입니다.
|
응답 본문
성공하는 경우 이 메서드는 파일 콘텐츠를 바이트로 반환합니다. Google Workspace 문서 및 MIME 유형 변환 형식의 목록은 Google Workspace 문서 및 해당하는 내보내기 MIME 유형을 참고하세요.
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.meet.readonly
https://www.googleapis.com/auth/drive.readonly
일부 범위는 제한되며 앱에서 사용하려면 보안 평가가 필요합니다. 자세한 내용은 승인 가이드를 참조하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-09-04(UTC)
[null,null,["최종 업데이트: 2024-09-04(UTC)"],[[["Exports a Google Workspace document to the requested MIME type, returning the file content as bytes with a 10MB size limit."],["Requires providing the file ID as a path parameter and the desired MIME type as a query parameter in the GET request."],["The request body should be empty, and successful responses contain the exported file content in the specified format."],["Authorization is necessary using one of the specified OAuth scopes, some of which may require a security assessment."]]],["This describes exporting Google Workspace documents via a `GET` request to `https://www.googleapis.com/drive/v3/files/{fileId}/export`. The `fileId` is a required path parameter, and `mimeType` is a required query parameter specifying the desired export format. The request body must be empty. A successful response returns the file content as bytes, limited to 10MB. Authorization requires specific OAuth scopes, including `drive`, `drive.file`, `drive.meet.readonly`, or `drive.readonly`.\n"]]