Download the PHP package lutsen/updrive without Composer

On this page you can find all versions of the php package lutsen/updrive. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package updrive

UpDrive: Allow anyone to upload files to your Google Drive with a simple webform

With 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.

Requirements

Install UpDrive

Install UpDrive and its dependencies with Composer with this command: $ php composer.phar create-project lutsen/updrive [project-name] 0.5
(Replace [project-name] with the desired directory name for your new project)

Rename config_example.php to config.php and add:

Create a Google API project web application

Download the json client secret file from you Google API project, rename it to client_secret.json and add it to the UpDrive root directory.

How to create a Google API project

  1. Go to the Google API Console. Create a new one by selecting Create a new project.
  2. 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.
  3. In the Credentials tab, select the New credentials drop-down list, and choose OAuth client ID.
  4. Under Application type, select Web application. In the Authorized Redirect URIs field, enter the URL of the oauth2callback.php page.
  5. Press the Create button.
  6. Download the client_secret json file (the download button is on the right).
  7. Rename this file to client_secret.json and add it to the UpDrive root directory.

Use UpDrive

The 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.

Reconnect UpDrive

To reconnect UpDrive to a Google account, delete the credentials.json file from your webserver and access UpDrive again. Now you can reconnect.

UpDrive project structure

An overview of the directories of a UpDrive and their contents.

public (directory)

Contains the index.php and oauth2callback.php file.

templates (directory)

This directory contains the template files for the setup and form html pages.

vendor (directory)

Created by Composer when installing the project dependencies.

config_example.php (file)

This 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.

init.php (file)

This file includes the config.php and vendor/autoload.php file.
It also sets up the Google_Client object.
The access scope to the Google Drive is defined here to. The UpDrive default is full access. You can find all available access scopes here.

UpDrive is a project of Lútsen Stellingwerff from HoverKraft, and started as a project for Supersolid.


All versions of updrive with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
google/apiclient Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lutsen/updrive contains the following files

Collapse All

public

  index.php
  oauth2callback.php

templates

  footer.php
  form.php
  header.php
  start.php
.gitignore
LICENSE.md
README.md
composer.json
config_example.php
init.php