Google, GitHub पर ये सैंपल होस्ट करता है. इन रिपॉज़िटरी को फ़ॉर्क किया जा सकता है और कोड का इस्तेमाल अपने प्रोजेक्ट के लिए रेफ़रंस के तौर पर किया जा सकता है.
Google पिकर
Google पिकर कोड सैंपल में, इमेज चुनने वाले टूल या अपलोड पेज का इस्तेमाल करने का तरीका बताया गया है. उपयोगकर्ता, वेब ऐप्लिकेशन में बटन दबाकर, इमेज चुनने वाले टूल या अपलोड पेज को खोल सकते हैं.
सोर्स को देखने या डाउनलोड करने के लिए, GitHub की रिपॉज़िटरी पर जाकर, Google पिकर पर जाएं.
क्विक एडिटर की मदद से फ़ाइलें खोलना और सेव करना
Quickeditors के इस कोड सैंपल में, Drive API की मदद से फ़ाइलें खोलने और सेव करने का तरीका बताया गया है.
Drive के प्लैटफ़ॉर्म के हिसाब से दिए गए हर उदाहरण में, एक ही सैंपल ऐप्लिकेशन दिखाया गया है: एक टेक्स्ट एडिटर, जिसे क्विक एडिटर कहा जाता है. यह MIME टाइप text/* वाली Drive फ़ाइलों में बदलाव कर सकता है. वेब वर्शन, Drive के इस्तेमाल के दो बुनियादी उदाहरणों को लागू करता है:
इस्तेमाल के दोनों उदाहरणों के लिए फ़्लो एक जैसा है. Drive, उपयोगकर्ता को ऐप्लिकेशन पर रीडायरेक्ट करता है. ऐसा तब होता है, जब उपयोगकर्ता, बनाएं मेन्यू या रजिस्टर किए गए MIME टाइप वाली फ़ाइल के संदर्भ मेन्यू से ऐप्लिकेशन को चुनता है.
सोर्स देखने या डाउनलोड करने के लिए, GitHub रिपॉज़िटरी पर Drive के क्विक एडिटर पर जाएं.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-02-24 (UTC) को अपडेट किया गया."],[[["This section provides Google Drive API samples, including code for integrating Google Picker and Quickeditors into web applications."],["The Google Picker sample demonstrates how to implement an image selector or upload page within a web app."],["Quickeditors samples showcase opening and saving files with the Drive API, including integration with Drive UI's \"New\" and \"Open with\" functionalities."],["Source code for both Google Picker and Quickeditors is available on GitHub for reference and adaptation in your projects."]]],["Google offers code samples on GitHub for the Drive API. The Google Picker sample demonstrates using an image selector or upload page within a web app, accessible via a button. The Quickeditors sample illustrates how to open and save files, integrating with Drive's \"New\" button and \"Open with\" context menu. Both samples provide text editor apps for files with the `text/*` MIME type. Source code is available on GitHub, which can be forked.\n"]]