Skip to content

Command line PHP utility for Google bucket API functions

License

Notifications You must be signed in to change notification settings

rizkhanriaz/gcs-php-utility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCS PHP Utility

Command line PHP utility for Google bucket API functions. Which can be used to upload and download files within a folder

Getting Started

This package is available on packagist. You can use the following command to add this package into your composer dependancies.

composer require rizkhan/gce-php-utility --dev

Configuration

You need to create a config.yml file in your project root. Below is the default config file.


---
bucket:
  name: your-bucket-name
  key: "keys/key-filename.json"
  syncfolder: "path/to/upload/and/download/dir/"
  uploadfiletypes: "jpg,gif,png,PNG,jpeg"

Upload to GCS Bucket

You can execute the below command to upload all files and subfolders

vendor/bin/console gcs:upload

Download from GCS Bucket

You can execute the below command to Download all files and subfolders

vendor/bin/console gcs:download

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details