Git Product home page Git Product logo

google_drive_fal's Introduction

Google Drive™ Driver for TYPO3's File Abstraction Layer (FAL)

This extension enables you to use files from Google Drive in your TYPO3 projects.

Please note: This extension is still in beta and might not work 100% as expected. Feel free to contribute.

  • View and modify files and folders from Google Drive in the Filelist module
  • Add images to content elements and create links to files for download.
  • Google Documents, Spreadsheets, and Slides are listed multiple times, once for each of their export formats (e.g. PDF or HTML).

Corresponding folder list in Google Drive and TYPO3 Filelist

Installation

  1. Install the extension using Composer: composer req mabolek/google-drive-fal
  2. Activate the extension in the Extensions module or by running vendor/bin/typo3 extension:activate google_drive_fal

Configuration

Set up Google OAuth Client ID

This a big topic and the detailes are described in detail in Google's documentation.

Here's the simple way:

  1. Click on the Enable Google Docs API button at https://developers.google.com/drive/api/v3/quickstart/js
  2. Download the Client Configuration and save it on the server
  3. Run vendor/bin/typo3 googledrive:setup [PATH-TO-FILE]
  4. You will be prompted to open a URL in your browser. Follow the authentication process in the browser.
  5. Paste in the entire resulting URL when you are prompted to enter the verification link.
  6. The extension will extract the verification code from the URL and (hopefully) tell you it has been successfully configured.

Create a File Storage Record

  1. Create a new File Storage Record in the root page.
  2. Give it a name.
  3. Choose Google Drive™ from the Driver menu.
  4. If you have a lot of files on your drive, we recommend that you supply a root folder identifier so Filelist doesn't have to process them all.
  5. If you do not supply one, the driver will create its own folder for manipulated and temporary images etc. This folder cannot be on the Google Drive itself, so the default is in a folder within typo3temp/assets/.
  6. Save and close.

Example file storage record

If you go to the Filelist module, you should see your Google Drive there.

Limitations

Your drive is not publicly available : TYPO3 will have to download each file to process it. That will work OK for images that are processed, because they are stored elsewhere, but file downloads may be slower than usual. The plan is to add a caching mechanism to make it faster to serve files publicly.

Contribution

This is a hobby project. Feel free to join the project or contibute pull requests of all kinds.

Thanks and Credits

This extension was created by Mathias Bolt Lesniak on his free time.

The original Client and SetupCredentialsCommand classes came from Georg Ringer's google_docs_content extension. That extension was also a major inspiration behind this project, and hopefully this driver will make that extension even better.

The GoogleDriveDriver class would not have been possible without the eye-opening code in Anders und sehr's Amazon S3 Driver.

Trademarks

Google Drive™ and the Google Drive™ logo are trademarks of Google Inc.

google_drive_fal's People

Contributors

mabolek avatar

Stargazers

Sascha Heilmeier avatar Christian Toffolo avatar Simon Schaufelberger avatar

Watchers

 avatar François CHAUSSIN avatar

google_drive_fal's Issues

Show & use images does not work

We don't know if it's a bug in TYPO10 but three extensions have the same problem now. DropboxFAL, your extension, and the extension we're developing for a digital asset management. As soon as you refer to the local storage as _processed folder, you are not able to show the image because it is searching for the original image in the LocalDriver.php. And of course, the image stays in your GDrive storage.

Reproduce:

  • just install the extension and select a folder of your GDrive.
  • go in FileList and try to click the show button
  • InvalidArgumentException appears because the file does not exist in LocalDriver.php

Cache file data in a public file storage

To prevent slow load times, file data that is requested from Google Drive should be cached locally or at least on a public file storage.

If this is not done, the data will have to be fetched from the Google Drive every time. This is slow and could hit the drive's bandwidth limit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.