Loading README.md +15 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,21 @@ S3 Uploads' URL rewriting feature can be disabled if the current website does no define( 'S3_UPLOADS_DISABLE_REPLACE_UPLOAD_URL', true ); ``` S3 Object Permissions ======= The object permission of files uploaded to S3 by this plugin can be controlled by setting the `S3_UPLOADS_OBJECT_ACL` constant. The default setting if not specified is `public-read` to allow objects to be read by anyone. If you don't want the uploads to be publicly readable then you can define `S3_UPLOADS_OBJECT_ACL` as one of `private` or `authenticated-read` in you wp-config file: ```PHP // Set the S3 object permission to private define('S3_UPLOADS_OBJECT_ACL', 'private'); ``` For more information on S3 permissions please see the Amazon S3 permissions documentation. Offline Development ======= Loading inc/class-s3-uploads.php +2 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,8 @@ class S3_Uploads { stream_wrapper_register( 's3', 'S3_Uploads_Local_Stream_Wrapper', STREAM_IS_URL ); } else { S3_Uploads_Stream_Wrapper::register( $this->s3() ); stream_context_set_option( stream_context_get_default(), 's3', 'ACL', 'public-read' ); $objectAcl = defined( 'S3_UPLOADS_OBJECT_ACL' ) ? S3_UPLOADS_OBJECT_ACL : 'public-read'; stream_context_set_option( stream_context_get_default(), 's3', 'ACL', $objectAcl ); } stream_context_set_option( stream_context_get_default(), 's3', 'seekable', true ); Loading Loading
README.md +15 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,21 @@ S3 Uploads' URL rewriting feature can be disabled if the current website does no define( 'S3_UPLOADS_DISABLE_REPLACE_UPLOAD_URL', true ); ``` S3 Object Permissions ======= The object permission of files uploaded to S3 by this plugin can be controlled by setting the `S3_UPLOADS_OBJECT_ACL` constant. The default setting if not specified is `public-read` to allow objects to be read by anyone. If you don't want the uploads to be publicly readable then you can define `S3_UPLOADS_OBJECT_ACL` as one of `private` or `authenticated-read` in you wp-config file: ```PHP // Set the S3 object permission to private define('S3_UPLOADS_OBJECT_ACL', 'private'); ``` For more information on S3 permissions please see the Amazon S3 permissions documentation. Offline Development ======= Loading
inc/class-s3-uploads.php +2 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,8 @@ class S3_Uploads { stream_wrapper_register( 's3', 'S3_Uploads_Local_Stream_Wrapper', STREAM_IS_URL ); } else { S3_Uploads_Stream_Wrapper::register( $this->s3() ); stream_context_set_option( stream_context_get_default(), 's3', 'ACL', 'public-read' ); $objectAcl = defined( 'S3_UPLOADS_OBJECT_ACL' ) ? S3_UPLOADS_OBJECT_ACL : 'public-read'; stream_context_set_option( stream_context_get_default(), 's3', 'ACL', $objectAcl ); } stream_context_set_option( stream_context_get_default(), 's3', 'seekable', true ); Loading