Commit 3a6bb2e0 authored by Joe Hoyle's avatar Joe Hoyle
Browse files

Add action when a file has been pushed to s3.

parent 508239ba
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -218,7 +218,16 @@ class S3_Uploads_Stream_Wrapper

		$this->clearCacheKey("s3://{$params['Bucket']}/{$params['Key']}");
		return $this->boolCall(function () use ($params) {
			return (bool) $this->getClient()->putObject($params);
			$bool = (bool) $this->getClient()->putObject($params);

			/**
			 * Action when a new object has been uploaded to s3.
			 *
			 * @param array  $params S3Client::putObject paramteres.
			 */
			do_action( 's3_uploads_putObject', $params );

			return $bool;
		});
	}