Download the PHP package masbug/flysystem-google-drive-ext without Composer

On this page you can find all versions of the php package masbug/flysystem-google-drive-ext. 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 flysystem-google-drive-ext

Flysystem adapter for Google Drive with seamless virtual<=>display path translation

Flysystem API version Latest Version on Packagist License Build Status StyleCI Total Downloads

Google uses unique IDs for each folder and file. This makes it difficult to integrate with other storage services which use normal paths.

This Flysystem adapter works around that problem by seamlessly translating paths from "display paths" to "virtual paths", and vice versa.

For example: virtual path /Xa3X9GlR6EmbnY1RLVTk5VUtOVkk/0B3X9GlR6EmbnY1RLVTk5VUtOVkk becomes /My Nice Dir/myFile.ext and all ID handling is hidden.

Installation

Getting Google Keys

Please follow Google Docs to obtain your client ID, client secret & refresh token.

In addition you can also check these easy-to-follow tutorial by @ivanvermeyen

Usage

File upload
File download
How to get TeamDrive list and IDs
How permanently deletes all of the user's trashed files

Using with Laravel Framework

Update .env file with google keys

Add the keys you created to your .env file and set google as your default cloud storage. You can copy the .env.example file and fill in the blanks.

Add disks on config/filesystems.php
Add driver storage in a ServiceProvider on path app/Providers/

Example:

Now you can access the drives like so:

Keep in mind that there can only be one default cloud storage drive, defined by FILESYSTEM_CLOUD in your .env (or config) file. If you set it to google, that will be the cloud drive:

Limitations

Using display paths as identifiers for folders and files requires them to be unique. Unfortunately Google Drive allows users to create files and folders with same (displayed) names. In such cases when unique path cannot be determined this adapter chooses the oldest (first) instance. In case the newer duplicate is a folder and user puts a unique file or folder inside the adapter will be able to reach it properly (because full path is unique).

Concurrent use of same Google Drive might lead to unexpected problems due to heavy caching of file/folder identifiers and file objects.

Acknowledgements

This adapter is based on wonderful flysystem-google-drive by Naoki Sawada.

It also contains an adaptation of Google_Http_MediaFileUpload by Google. I've added support for resumable uploads directly from streams (avoiding copying data to memory).

TeamDrive support was implemented by Maximilian Ruta - Deltachaos.

Adapter rewrite for Flysystem V2 and various fixes were implemented by Erik Niebla - erikn69.


All versions of flysystem-google-drive-ext with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 | ^8.0
ext-mbstring Version *
guzzlehttp/guzzle Version ^6.3 | ^7.0
league/flysystem Version ^2.1.1|^3.0
google/apiclient Version ^2.2
guzzlehttp/psr7 Version ^1.7|^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 masbug/flysystem-google-drive-ext contains the following files

Loading the files please wait ....