Commit 128fe775 authored by Joe Hoyle's avatar Joe Hoyle
Browse files

Add relative protocol to the custom bucket hostname

parent b076df31
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ class S3_Uploads {
		$this->bucket = $bucket;
		$this->key = $key;
		$this->secret = $secret;
		$this->bucket_hostname = $bucket_hostname ? $bucket_hostname : 'https://' . strtok( $this->bucket, '/' ) . '.s3.amazonaws.com';
		$this->bucket_hostname = $bucket_hostname ? '//' . $bucket_hostname : 'https://' . strtok( $this->bucket, '/' ) . '.s3.amazonaws.com';

		$this->s3()->registerStreamWrapper();
		stream_context_set_option( stream_context_get_default(), 's3', 'ACL', Aws\S3\Enum\CannedAcl::PUBLIC_READ );