{"id":26794783,"url":"https://github.com/lutsen/updrive","last_synced_at":"2025-04-22T18:06:08.426Z","repository":{"id":50702055,"uuid":"74569740","full_name":"lutsen/updrive","owner":"lutsen","description":"UpDrive: Allow anyone to upload files to your Google Drive with a simple webform","archived":false,"fork":false,"pushed_at":"2016-11-23T21:25:49.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T10:50:27.731Z","etag":null,"topics":["google-drive","php","webform"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lutsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-23T11:20:43.000Z","updated_at":"2022-07-31T21:48:25.000Z","dependencies_parsed_at":"2022-09-11T03:10:29.354Z","dependency_job_id":null,"html_url":"https://github.com/lutsen/updrive","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Fupdrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Fupdrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Fupdrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lutsen%2Fupdrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lutsen","download_url":"https://codeload.github.com/lutsen/updrive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246218676,"owners_count":20742427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-drive","php","webform"],"created_at":"2025-03-29T17:28:54.788Z","updated_at":"2025-03-29T17:28:55.298Z","avatar_url":"https://github.com/lutsen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"UpDrive: Allow anyone to upload files to your Google Drive with a simple webform\n================================================================================\n\nWith a simple webform, hosted on your own webserver, anyone you want can upload files to your Google Drive, in folders you specify. UpDrive is a project written in PHP. It uses the Google API client PHP SDK.\n\n\n\nRequirements\n------------\n\n- PHP 5.5 or newer\n- [A Google API project](https://console.developers.google.com/apis/library)\n\n\nInstall UpDrive\n---------------\n\nInstall UpDrive and its dependencies with [Composer](https://getcomposer.org/) with this command: `$ php composer.phar create-project lutsen/updrive [project-name] 0.5`  \n(Replace [project-name] with the desired directory name for your new project)  \n\nRename *config_example.php* to *config.php* and add:\n- your server paths\n- the names of the folders people can upload to  \n\nCreate a Google API project web application  \n\nDownload the json client secret file from you Google API project, rename it to *client_secret.json* and add it to the UpDrive root directory.  \n\n\n#### How to create a Google API project ####\n\n1. Go to the [Google API Console](https://console.developers.google.com/project/_/apiui/apis/library). Create a new one by selecting Create a new project.\n2. In the sidebar under \"API Manager\", select Credentials, then select the OAuth consent screen tab. Choose an Email Address, specify a Product Name, and press Save.\n3. In the Credentials tab, select the New credentials drop-down list, and choose OAuth client ID.\n4. Under Application type, select Web application. In the Authorized Redirect URIs field, enter the URL of the *oauth2callback.php* page.\n5. Press the Create button.\n6. Download the client_secret json file (the download button is on the right).\n7. Rename this file to *client_secret.json* and add it to the UpDrive root directory.\n\n\n\nUse UpDrive\n-----------\n\nThe first time you access UpDrive, you have to connect to the Google account of the Google Drive you want to use. After authorising the UpDrive web application, the OAuth credentials are saved in the *credentials.json* file. Now people can use the webform to upload files to your Google Drive.  \n\n\n#### Reconnect UpDrive ####\n\nTo reconnect UpDrive to a Google account, delete the *credentials.json* file from your webserver and access UpDrive again. Now you can reconnect.\n\n\n\nUpDrive project structure\n-------------------------\n\nAn overview of the directories of a UpDrive and their contents.\n\n\n\n#### public (directory) ####\n\nContains the *index.php* and *oauth2callback.php* file.\n\n\n#### templates (directory) ####\n\nThis directory contains the template files for the setup and form html pages.\n\n\n#### vendor (directory) ####\n\nCreated by [Composer](https://getcomposer.org/) when installing the project dependencies.\n\n\n#### config_example.php (file) ####\n\nThis is an example of the *config.php* file. The *config.php* file is needed for UpDrive to work. Rename the *config_example.php* to *config.php* and add the necessary details.\n\n\n#### init.php (file) ####\n\nThis file includes the *config.php* and *vendor/autoload.php* file.  \nIt also sets up the Google_Client object.  \nThe access scope to the Google Drive is defined here to. The UpDrive default is full access. You can find all available access scopes [here](https://developers.google.com/drive/v3/web/about-auth).\n\n\n\nUpDrive is a project of [Lútsen Stellingwerff](http://lutsen.land/) from [HoverKraft](http://www.hoverkraft.nl/), and started as a project for [Supersolid](http://www.supersolid.nl/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flutsen%2Fupdrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flutsen%2Fupdrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flutsen%2Fupdrive/lists"}