How ticgal/gdrive works
Gdrive is a GLPI plugin that lets users select Google Drive files and add them to GLPI assets. The main workflow is exposed through GLPI item-form hooks: the plugin renders a picker button, obtains a temporary Google access token, retrieves selected file content, and hands it to GLPI's upload mechanism. Configuration stores Google API credentials and is managed through GLPI's protected configuration page. The excerpts show these responsibilities but not all upload internals; the result handoff is represented at the GLPI boundary.
Main entry points: Ticket.php Picker button · Config.php Google settings · setup.php Hook registration · config.form.php Config endpoint
Components 14
GLPI Integration
- Hook registration
setup.php - Item form UI
src/Ticket.php
Plugin Configuration
- Config endpoint
front/config.form.php - Google settings
src/Config.php - Plugin config table
src/Config.php - Install lifecycle
hook.php
Drive File Transfer
- Picker button
src/Ticket.php - File retrieval and upload
src/Ticket.php
Other components
- GLPI user
- GLPI host
- Google OAuth
- Google Picker
- Google Drive API
- GLPI file upload
Connections 16
- GLPI host → Hook registration: initializes plugin
setup.php - Hook registration → Item form UI: registers item hooks
setup.php - GLPI user → GLPI host: opens asset
README.md - Item form UI → Google settings: loads settings
src/Ticket.php - GLPI user → Config endpoint: manages credentials
README.md - Config endpoint → Google settings: updates settings
front/config.form.php - Google settings → Plugin config table: reads and writes
src/Config.php - Install lifecycle → Google settings: installs or removes
hook.php - Item form UI → Picker button: renders picker
src/Ticket.php - GLPI user → Picker button: selects files
README.md - Picker button → Google OAuth: requests token
src/Ticket.php - Picker button → Google Picker: opens picker
src/Ticket.php - Google Picker → File retrieval and upload: returns selection
- File retrieval and upload → Google Drive API: fetches file
src/Ticket.php - File retrieval and upload → GLPI file upload: uploads content
src/Ticket.php - GLPI file upload → GLPI host: adds file to asset
README.md