Commit 72afa1a0 authored by zscott's avatar zscott
Browse files

Merge branch 'master' into verify-command

parents 2e09c39e bb2b322b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -3,6 +3,9 @@
# Tell Travis CI we're using PHP
language: php

notifications:
  email: false

php:
  - 5.5

@@ -17,3 +20,11 @@ matrix:
# Clones WordPress and configures our testing environment.
before_script:
  - bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 $WP_VERSION
  - printf "\n" | pecl install imagick

script:
  - phpunit --coverage-clover clover.xml

after_script:
  # Push coverage off to Codecov
  - bash <(curl -s https://codecov.io/bash)
 No newline at end of file
+22 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ S3-Uploads
==========

[![Build Status](https://travis-ci.org/humanmade/S3-Uploads.svg?branch=master)](https://travis-ci.org/humanmade/S3-Uploads)
[![codecov.io](http://codecov.io/github/humanmade/S3-Uploads/coverage.svg?branch=master)](http://codecov.io/github/humanmade/S3-Uploads?branch=master)

WordPress plugin to store uploads on S3. S3-Uploads aims to be a lightweight "drop-in" for storing uploads on Amazon S3 instead of the local filesystem.

@@ -68,10 +69,30 @@ wp s3-uploads upload-directory <from> <to> [--sync] [--dry-run]

Passing `--sync` will only upload files that are newer in `<from>` or that don't exist on S3 already. Use `--dry-run` to test.

There is also an all purpose `cp` command for arbitraty copying to and from S3.
There is also an all purpose `cp` command for arbitrary copying to and from S3.

```
wp s3-uploads cp <from> <to>
```

Note: as either `<from>` or `<to>` can be S3 or local locations, you must speficy the full S3 location via `s3://mybucket/mydirectory` for example `cp ./test.txt s3://mybucket/test.txt`.

Cache Control
==========

You can define the default HTTP `Cache-Control` header for uploaded media using the
following constant:

```PHP
define( 'S3_UPLOADS_CACHE_CONTROL', 30 * 24 * 60 * 60 );
	// will expire in 30 days time
```

You can also configure the `Expires` header using the `S3_UPLOADS_EXPIRES` constant
For instance if you wanted to set an asset to effectively not expire, you could
set the Expires header way off in the future.  For example:

```PHP
define( 'S3_UPLOADS_EXPIRES', gmdate( 'D, d M Y H:i:s', time() + (10 * 365 * 24 * 60 * 60) ) .' GMT' );
	// will expire in 10 years time
```

inc/aws-sdk/.DS_Store

deleted100644 → 0
−12 KiB

File deleted.

+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ use Guzzle\Service\Resource\ResourceIteratorInterface;
 * Client to interact with Auto Scaling
 *
 * @method Model attachInstances(array $args = array()) {@command AutoScaling AttachInstances}
 * @method Model attachLoadBalancers(array $args = array()) {@command AutoScaling AttachLoadBalancers}
 * @method Model completeLifecycleAction(array $args = array()) {@command AutoScaling CompleteLifecycleAction}
 * @method Model createAutoScalingGroup(array $args = array()) {@command AutoScaling CreateAutoScalingGroup}
 * @method Model createLaunchConfiguration(array $args = array()) {@command AutoScaling CreateLaunchConfiguration}
@@ -46,6 +47,7 @@ use Guzzle\Service\Resource\ResourceIteratorInterface;
 * @method Model describeLaunchConfigurations(array $args = array()) {@command AutoScaling DescribeLaunchConfigurations}
 * @method Model describeLifecycleHookTypes(array $args = array()) {@command AutoScaling DescribeLifecycleHookTypes}
 * @method Model describeLifecycleHooks(array $args = array()) {@command AutoScaling DescribeLifecycleHooks}
 * @method Model describeLoadBalancers(array $args = array()) {@command AutoScaling DescribeLoadBalancers}
 * @method Model describeMetricCollectionTypes(array $args = array()) {@command AutoScaling DescribeMetricCollectionTypes}
 * @method Model describeNotificationConfigurations(array $args = array()) {@command AutoScaling DescribeNotificationConfigurations}
 * @method Model describePolicies(array $args = array()) {@command AutoScaling DescribePolicies}
@@ -55,6 +57,7 @@ use Guzzle\Service\Resource\ResourceIteratorInterface;
 * @method Model describeTags(array $args = array()) {@command AutoScaling DescribeTags}
 * @method Model describeTerminationPolicyTypes(array $args = array()) {@command AutoScaling DescribeTerminationPolicyTypes}
 * @method Model detachInstances(array $args = array()) {@command AutoScaling DetachInstances}
 * @method Model detachLoadBalancers(array $args = array()) {@command AutoScaling DetachLoadBalancers}
 * @method Model disableMetricsCollection(array $args = array()) {@command AutoScaling DisableMetricsCollection}
 * @method Model enableMetricsCollection(array $args = array()) {@command AutoScaling EnableMetricsCollection}
 * @method Model enterStandby(array $args = array()) {@command AutoScaling EnterStandby}
+0 −0

File mode changed from 100755 to 100644.

Loading