Iain Poulson
Forum Replies Created
-
Hi, is this still an issue? Can you swap bucket and then swap back to see if that resolves?
Hi
You can use the ‘as3cf_upload_acl’ filter to change the upload policy for the file to private. Check out our tweaks plugin to get you started https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront-tweaks
Thanks Nick, was about to send you this and say the same, we need to update our example ??
{
“Version”: “2012-10-17”,
“Statement”: [
{
“Sid”: “Stmt1422543245111”,
“Effect”: “Allow”,
“Action”: [
“s3:CreateBucket”,
“s3:DeleteObject”,
“s3:Put*”,
“s3:Get*”,
“s3:List*”
],
“Resource”: [
“arn:aws:s3:::*”
]
}
]
}If you use the plugin with an AWS IAM user you can control the permissions and not allow deleting of buckets.
The only delete permission the user needs for the plugin is DeleteObject
This should work as the plugin stores, for each attachment, the bucket and filename and path in the bucket, so as long as you migrate the database between the sites you should be all good.
We are currently working on the Pro version to allow uploading of existing media files to S3, however, matching media attachments with already existing S3 content would be a little trickier.
We hook into the WordPress ‘wp_get_attachment_url’ function to rewrite to the S3 URL, take a look here https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/blob/master/classes/amazon-s3-and-cloudfront.php#L609
Hi Nick
The plugin does not allow anyone to delete buckets.
The plugin’s settings, where you can create buckets, is limited to admins with the ‘manage_options’ capability or for Multisites those with ‘manage_network_options’.
Let me know if you need any further info.
Hi Mike
Once you have selected the bucket, you should be able to revert the IAM policy back to the specific bucket and still use the plugin. Can you post your policy (with bucket name changed) so I can try to recreate please?
Forum: Plugins
In reply to: [Amazon Web Services] Supporting S3 signature version 4This should be fixed in the latest version of both plugins
Hi Mike
Is the WP site running on AWS at all? Have you got an IAM user with a group applied? Can you try adding just a policy to the user?
Forum: Plugins
In reply to: [Amazon Web Services] Activation ErrorThis issue will be fixed in the next version of the plugin
Just managed to delete ok with the same group policy. What version of the Amazon Web Services plugin are you using?
Ok so the problem here is that WP_Image_Editor requires the file to be present on the server. We have encountered this with the Regenerate Thumbnails plugin and have built support for it in the next version. https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/pull/170
In that change we have hooked into the filter ‘get_attached_file’ to copy the file back to the server so it can be used and then cleaned up after. Other plugins and themes can utilise this like we have for regenerate thumbnails (https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront/commit/a7650ac6c12b67318fcd1a3fb41b6ae3f875ba4f)
If we get enough requests for a certain plugin/theme compatibility we may add in support to the plugin, but in the short term this functionality can be added in a separate plugin or in the Themify theme itself.
The plugin hooks into the filter ‘wp_update_attachment_metadata’ to do its magic, so if you use that it should work for you.
Are you setting the plugin to remove local copies of the images?