diff --git a/src/content/docs/r2/examples/aws/aws-sdk-php.mdx b/src/content/docs/r2/examples/aws/aws-sdk-php.mdx index 203d0d54ad9..f1fed16bef6 100644 --- a/src/content/docs/r2/examples/aws/aws-sdk-php.mdx +++ b/src/content/docs/r2/examples/aws/aws-sdk-php.mdx @@ -103,7 +103,7 @@ $cmd = $s3_client->getCommand('GetObject', [ // The second parameter allows you to determine how long the presigned link is valid. $request = $s3_client->createPresignedRequest($cmd, '+1 hour'); -print_r((string)$request->getUri()) +print_r((string)$request->getUri()); // https://my-bucket..r2.cloudflarestorage.com/ferriswasm.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=&X-Amz-Date=&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature= // You can also create links for operations such as putObject to allow temporary write access to a specific key. @@ -114,11 +114,11 @@ $cmd = $s3_client->getCommand('PutObject', [ $request = $s3_client->createPresignedRequest($cmd, '+1 hour'); -print_r((string)$request->getUri()) +print_r((string)$request->getUri()); ``` You can use the link generated by the `putObject` example to upload to the specified bucket and key, until the presigned link expires. ```sh -curl -X PUT https://my-bucket..r2.cloudflarestorage.com/ferriswasm.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=&X-Amz-Date=&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature= --data-binary @ferriswasm.png +curl -X PUT "https://my-bucket..r2.cloudflarestorage.com/ferriswasm.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=&X-Amz-Date=&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=" --data-binary @ferriswasm.png ```