Method: files.export
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, Google Workspace दस्तावेज़ को अनुरोध किए गए MIME टाइप में एक्सपोर्ट करता है. साथ ही, एक्सपोर्ट किए गए बाइट कॉन्टेंट को दिखाता है. ज़्यादा जानकारी के लिए, फ़ाइलें डाउनलोड और एक्सपोर्ट करना लेख पढ़ें.
ध्यान दें कि एक्सपोर्ट किए गए कॉन्टेंट का साइज़ 10 एमबी से ज़्यादा नहीं होना चाहिए.
एचटीटीपी अनुरोध
GET https://www.googleapis.com/drive/v3/files/{fileId}/export
यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
fileId |
string
फ़ाइल का आईडी.
|
क्वेरी पैरामीटर
पैरामीटर |
mimeType |
string
ज़रूरी है. इस एक्सपोर्ट के लिए अनुरोध किए गए फ़ॉर्मैट का MIME टाइप. साथ काम करने वाले 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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-27 (UTC) को अपडेट किया गया."],[],[],null,["# Method: files.export\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nExports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.\n\n### HTTP request\n\n`GET https://www.googleapis.com/drive/v3/files/{fileId}/export`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------|\n| `fileId` | `string` The ID of the file. |\n\n### Query parameters\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------|\n| `mimeType` | `string` Required. The MIME type of the format requested for this export. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, this method returns the file content as bytes. For a list of Google Workspace documents and MIME type conversion formats, see [Google Workspace documents and corresponding export MIME types](/drive/api/guides/ref-export-formats).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.file`\n- `\n https://www.googleapis.com/auth/drive.meet.readonly`\n- `\n https://www.googleapis.com/auth/drive.readonly`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]