Skip to content

globalfoodbook/wp-stateless

 
 

Repository files navigation

Stateless Media Plugin

wpCloud Stateless Media for GCE


Issues - Bug Issues - Backlog ![Issues - Active](https://badge.waffle.io/wpCloud/wp-stateless.png?label=in progress&title=Active)


Dependency Status Scrutinizer Quality Scrutinizer Coverage Packagist Vesion


Usage

define( 'WP_STATELESS_MEDIA_BUCKET', 'media.application-domain.com' );
define( 'WP_STATELESS_MEDIA_MODE', 'cdn' );
define( 'WP_STATELESS_MEDIA_KEY_FILE_PATH', '/var/www/wp-content/keys/application-name-service-id.p12' );
define( 'WP_STATELESS_MEDIA_SERVICE_ACCOUNT', '[email protected]' );
{
  "wp_stateless_media": {
    "bucket": "media.application-domain.com",
    "mode": "cdn",
    "key_file_path": "/var/www/wp-content/keys/application-name-service-id.p12",
    "service_account": "[email protected]"
  }
}

Set options:

wp option update sm_mode cdn
wp option update sm_service_account_name [email protected]
wp option update sm_key_file_path /var/www/wp-content/keys/some-key.p12
wp option update sm_bucket media.site.com

Available Constants

Setting a setting via constants will prevent ability to make changes in control panel.

  • WP_STATELESS_MEDIA_MODE - Set to "disabled", "backup" or "cdn" to configure mode.
  • WP_STATELESS_MEDIA_SERVICE_ACCOUNT - Google email address of service account.
  • WP_STATELESS_MEDIA_KEY_FILE_PATH - Absolute, or relative to web-root, path to P12 file.

Response Headers

  • x-goog-meta-object-id
  • x-goog-meta-height
  • x-goog-meta-width
  • x-goog-meta-source-id
  • x-goog-meta-file-hash
  • x-goog-meta-child-of

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 80.8%
  • JavaScript 13.4%
  • Shell 4.8%
  • Other 1.0%