Version Description
- 2015-09-01 =
- Bug fix: Fatal error: Cannot use object of type WP_Error as array
Download this release
Release Info
Developer | deliciousbrains |
Plugin | WP Offload S3 Lite |
Version | 0.9.5 |
Comparing to | |
See all releases |
Code changes from version 0.9.4 to 0.9.5
- README.md +4 -1
- classes/amazon-s3-and-cloudfront.php +6 -18
- classes/upgrades/as3cf-meta-wp-error.php +156 -0
- languages/amazon-s3-and-cloudfront-en.pot +32 -26
- readme.txt +5 -2
- wordpress-s3.php +3 -2
README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
**Tags:** uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
|
4 |
**Requires at least:** 3.7
|
5 |
**Tested up to:** 4.3
|
6 |
-
**Stable tag:** 0.9.
|
7 |
**License:** GPLv3
|
8 |
|
9 |
Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
|
@@ -67,6 +67,9 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
|
|
67 |
|
68 |
## Changelog ##
|
69 |
|
|
|
|
|
|
|
70 |
### 0.9.4 - 2015-08-27 ###
|
71 |
* New: Update all existing attachments with missing file sizes when the 'Remove Files From Server' option is enabled (automatically runs in the background)
|
72 |
* Improvement: Show when constants are used to set bucket and region options
|
3 |
**Tags:** uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
|
4 |
**Requires at least:** 3.7
|
5 |
**Tested up to:** 4.3
|
6 |
+
**Stable tag:** 0.9.5
|
7 |
**License:** GPLv3
|
8 |
|
9 |
Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
|
67 |
|
68 |
## Changelog ##
|
69 |
|
70 |
+
### 0.9.5 - 2015-09-01 ###
|
71 |
+
* Bug fix: Fatal error: Cannot use object of type WP_Error as array
|
72 |
+
|
73 |
### 0.9.4 - 2015-08-27 ###
|
74 |
* New: Update all existing attachments with missing file sizes when the 'Remove Files From Server' option is enabled (automatically runs in the background)
|
75 |
* Improvement: Show when constants are used to set bucket and region options
|
classes/amazon-s3-and-cloudfront.php
CHANGED
@@ -86,6 +86,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
|
|
86 |
|
87 |
new AS3CF_Upgrade_Region_Meta( $this );
|
88 |
new AS3CF_Upgrade_File_Sizes( $this );
|
|
|
89 |
|
90 |
add_action( 'aws_admin_menu', array( $this, 'admin_menu' ) );
|
91 |
add_action( 'wp_ajax_as3cf-get-buckets', array( $this, 'ajax_get_buckets' ) );
|
@@ -489,7 +490,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
|
|
489 |
}
|
490 |
|
491 |
// upload attachment to S3
|
492 |
-
$
|
493 |
|
494 |
return $data;
|
495 |
}
|
@@ -507,9 +508,7 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
|
|
507 |
* @return array|WP_Error $s3object|$meta If meta is supplied, return it. Else return S3 meta
|
508 |
*/
|
509 |
function upload_attachment_to_s3( $post_id, $data = null, $file_path = null, $force_new_s3_client = false, $remove_local_files = true ) {
|
510 |
-
$return_metadata = true;
|
511 |
if ( is_null( $data ) ) {
|
512 |
-
$return_metadata = false;
|
513 |
$data = wp_get_attachment_metadata( $post_id, true );
|
514 |
}
|
515 |
|
@@ -628,11 +627,8 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
|
|
628 |
// Store in the attachment meta data for use by WP
|
629 |
$data['filesize'] = $bytes;
|
630 |
|
631 |
-
|
632 |
-
|
633 |
-
// So update metadata manually
|
634 |
-
update_post_meta( $post_id, '_wp_attachment_metadata', $data );
|
635 |
-
}
|
636 |
|
637 |
// Add to the file size total
|
638 |
$filesize_total += $bytes;
|
@@ -692,21 +688,13 @@ class Amazon_S3_And_CloudFront extends AWS_Plugin_Base {
|
|
692 |
// Make sure we don't have a cached file sizes in the meta
|
693 |
unset( $data['filesize'] );
|
694 |
|
695 |
-
|
696 |
-
|
697 |
-
// So update metadata manually
|
698 |
-
update_post_meta( $post_id, '_wp_attachment_metadata', $data );
|
699 |
-
}
|
700 |
|
701 |
delete_post_meta( $post_id, 'wpos3_filesize_total' );
|
702 |
}
|
703 |
}
|
704 |
|
705 |
-
if ( $return_metadata ) {
|
706 |
-
// If the attachment metadata is supplied, return it
|
707 |
-
return $data;
|
708 |
-
}
|
709 |
-
|
710 |
return $s3object;
|
711 |
}
|
712 |
|
86 |
|
87 |
new AS3CF_Upgrade_Region_Meta( $this );
|
88 |
new AS3CF_Upgrade_File_Sizes( $this );
|
89 |
+
new AS3CF_Upgrade_Meta_WP_Error( $this );
|
90 |
|
91 |
add_action( 'aws_admin_menu', array( $this, 'admin_menu' ) );
|
92 |
add_action( 'wp_ajax_as3cf-get-buckets', array( $this, 'ajax_get_buckets' ) );
|
490 |
}
|
491 |
|
492 |
// upload attachment to S3
|
493 |
+
$this->upload_attachment_to_s3( $post_id, $data );
|
494 |
|
495 |
return $data;
|
496 |
}
|
508 |
* @return array|WP_Error $s3object|$meta If meta is supplied, return it. Else return S3 meta
|
509 |
*/
|
510 |
function upload_attachment_to_s3( $post_id, $data = null, $file_path = null, $force_new_s3_client = false, $remove_local_files = true ) {
|
|
|
511 |
if ( is_null( $data ) ) {
|
|
|
512 |
$data = wp_get_attachment_metadata( $post_id, true );
|
513 |
}
|
514 |
|
627 |
// Store in the attachment meta data for use by WP
|
628 |
$data['filesize'] = $bytes;
|
629 |
|
630 |
+
// Update metadata with filesize
|
631 |
+
update_post_meta( $post_id, '_wp_attachment_metadata', $data );
|
|
|
|
|
|
|
632 |
|
633 |
// Add to the file size total
|
634 |
$filesize_total += $bytes;
|
688 |
// Make sure we don't have a cached file sizes in the meta
|
689 |
unset( $data['filesize'] );
|
690 |
|
691 |
+
// Remove the filesize from the metadata
|
692 |
+
update_post_meta( $post_id, '_wp_attachment_metadata', $data );
|
|
|
|
|
|
|
693 |
|
694 |
delete_post_meta( $post_id, 'wpos3_filesize_total' );
|
695 |
}
|
696 |
}
|
697 |
|
|
|
|
|
|
|
|
|
|
|
698 |
return $s3object;
|
699 |
}
|
700 |
|
classes/upgrades/as3cf-meta-wp-error.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Update Broken _wp_attachment_metadata introduced in 0.9.4
|
4 |
+
*
|
5 |
+
* @package amazon-s3-and-cloudfront
|
6 |
+
* @subpackage Classes/Upgrades/Meta-WP-Error
|
7 |
+
* @copyright Copyright (c) 2015, Delicious Brains
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 0.9.5
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* AS3CF_Upgrade_Meta_WP_Error Class
|
19 |
+
*
|
20 |
+
* This class handles updating the _wp_attachment_metadata
|
21 |
+
* for attachments that have been removed from the local server
|
22 |
+
* and have had it corrupted by another plugin
|
23 |
+
*
|
24 |
+
* @since 0.9.5
|
25 |
+
*/
|
26 |
+
class AS3CF_Upgrade_Meta_WP_Error extends AS3CF_Upgrade {
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Initiate the upgrade
|
30 |
+
*
|
31 |
+
* @param object $as3cf Instance of calling class
|
32 |
+
*/
|
33 |
+
public function __construct( $as3cf ) {
|
34 |
+
$this->upgrade_id = 3;
|
35 |
+
$this->upgrade_name = 'meta_error';
|
36 |
+
$this->upgrade_type = 'attachments';
|
37 |
+
|
38 |
+
$this->running_update_text = __( 'and rebuilding the metadata for attachments that may have been corrupted.', 'as3cf' );
|
39 |
+
|
40 |
+
parent::__construct( $as3cf );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Rebuild the attachment metadata for an attachment
|
45 |
+
*
|
46 |
+
* @param $attachment
|
47 |
+
*
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
function upgrade_attachment( $attachment ) {
|
51 |
+
$s3object = unserialize( $attachment->s3object );
|
52 |
+
if ( false === $s3object ) {
|
53 |
+
error_log( 'Failed to unserialize S3 meta for attachment ' . $attachment->ID . ': ' . $attachment->s3object );
|
54 |
+
$this->error_count++;
|
55 |
+
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
|
59 |
+
$file = get_attached_file( $attachment->ID, true );
|
60 |
+
|
61 |
+
if ( ! file_exists( $file ) ) {
|
62 |
+
// Copy back the file to the server if doesn't exist so we can successfully
|
63 |
+
// regenerate the attachment metadata
|
64 |
+
try {
|
65 |
+
$args = array(
|
66 |
+
'Bucket' => $s3object['bucket'],
|
67 |
+
'Key' => $s3object['key'],
|
68 |
+
'SaveAs' => $file,
|
69 |
+
);
|
70 |
+
$this->as3cf->get_s3client( $s3object['region'], true )->getObject( $args );
|
71 |
+
} catch ( Exception $e ) {
|
72 |
+
error_log( sprintf( __( 'There was an error attempting to download the file %s from S3: %s', 'as3cf' ), $s3object['key'], $e->getMessage() ) );
|
73 |
+
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
// Remove corrupted meta
|
79 |
+
delete_post_meta( $attachment->ID, '_wp_attachment_metadata' );
|
80 |
+
|
81 |
+
require_once ABSPATH . '/wp-admin/includes/image.php';
|
82 |
+
// Generate new attachment meta
|
83 |
+
wp_update_attachment_metadata( $attachment->ID, wp_generate_attachment_metadata( $attachment->ID, $file ) );
|
84 |
+
|
85 |
+
return true;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Get a count of all attachments without region in their S3 metadata
|
90 |
+
* for the whole site
|
91 |
+
*
|
92 |
+
* @return int
|
93 |
+
*/
|
94 |
+
function count_attachments_to_process() {
|
95 |
+
// get the table prefixes for all the blogs
|
96 |
+
$table_prefixes = $this->as3cf->get_all_blog_table_prefixes();
|
97 |
+
$all_count = 0;
|
98 |
+
|
99 |
+
foreach ( $table_prefixes as $blog_id => $table_prefix ) {
|
100 |
+
$count = $this->get_attachments_with_error_metadata( $table_prefix, true );
|
101 |
+
$all_count += $count;
|
102 |
+
}
|
103 |
+
|
104 |
+
return $all_count;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Get all attachments that don't have region in their S3 meta data for a blog
|
109 |
+
*
|
110 |
+
* @param string $prefix
|
111 |
+
* @param int $limit
|
112 |
+
*
|
113 |
+
* @return mixed
|
114 |
+
*/
|
115 |
+
function get_attachments_to_process( $prefix, $limit ) {
|
116 |
+
$attachments = $this->get_attachments_with_error_metadata( $prefix, false, $limit );
|
117 |
+
|
118 |
+
return $attachments;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Get S3 attachments that have had their _wp_attachment_metadata corrupted
|
123 |
+
*
|
124 |
+
* @param string $prefix
|
125 |
+
* @param bool|false $count
|
126 |
+
* @param null|int $limit
|
127 |
+
*
|
128 |
+
* @return array|int
|
129 |
+
*/
|
130 |
+
function get_attachments_with_error_metadata( $prefix, $count = false, $limit = null ) {
|
131 |
+
global $wpdb;
|
132 |
+
|
133 |
+
$sql = "FROM `{$prefix}postmeta` pm1
|
134 |
+
LEFT OUTER JOIN `{$prefix}postmeta` pm2
|
135 |
+
ON pm1.`post_id` = pm2.`post_id`
|
136 |
+
AND pm2.`meta_key` = '_wp_attachment_metadata'
|
137 |
+
WHERE pm1.`meta_key` = 'amazonS3_info'
|
138 |
+
AND pm2.`meta_value` like '%%WP_Error%%'";
|
139 |
+
|
140 |
+
if ( $count ) {
|
141 |
+
$sql = 'SELECT COUNT(*)' . $sql;
|
142 |
+
|
143 |
+
return $wpdb->get_var( $sql );
|
144 |
+
}
|
145 |
+
|
146 |
+
$sql = "SELECT pm1.`post_id` as `ID`, pm1.`meta_value` AS 's3object'" . $sql;
|
147 |
+
|
148 |
+
if ( ! is_null( $limit ) ) {
|
149 |
+
$sql .= ' LIMIT %d';
|
150 |
+
|
151 |
+
$sql = $wpdb->prepare( $sql, $limit );
|
152 |
+
}
|
153 |
+
|
154 |
+
return $wpdb->get_results( $sql, OBJECT );
|
155 |
+
}
|
156 |
+
}
|
languages/amazon-s3-and-cloudfront-en.pot
CHANGED
@@ -8,7 +8,7 @@ msgid ""
|
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: amazon-s3-and-cloudfront\n"
|
10 |
"Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
|
11 |
-
"POT-Creation-Date: 2015-
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -25,112 +25,112 @@ msgstr ""
|
|
25 |
msgid "S3 and CloudFront"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
29 |
#, php-format
|
30 |
msgid "File %s does not exist"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
34 |
#, php-format
|
35 |
msgid "Mime type %s is not allowed"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
39 |
#, php-format
|
40 |
msgid "Error uploading %s to S3: %s"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
44 |
msgid "Cheatin’ eh?"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
48 |
msgid "You do not have sufficient permissions to access this page."
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
52 |
msgid "No bucket name provided."
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
56 |
msgid "Error Getting Bucket Region"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
60 |
#, php-format
|
61 |
msgid "There was an error attempting to get the region of the bucket %s: %s"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
65 |
msgid ""
|
66 |
"This is a test file to check if the user has write permission to S3. Delete "
|
67 |
"me if found."
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
71 |
#, php-format
|
72 |
msgid ""
|
73 |
"There was an error attempting to check the permissions of the bucket %s: %s"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
77 |
msgid "Error creating bucket"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
81 |
msgid "Bucket name too short."
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
85 |
msgid "Bucket name too long."
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
89 |
msgid ""
|
90 |
"Invalid character. Bucket names can contain lowercase letters, numbers, "
|
91 |
"periods and hyphens."
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
95 |
msgid "Error saving bucket"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
99 |
msgid "Error fetching buckets"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
103 |
msgid "Error getting URL preview: "
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
107 |
msgid "The changes you made will be lost if you navigate away from this page"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
111 |
msgid "Cheatin' eh?"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
115 |
msgctxt "Show the media library tab"
|
116 |
msgid "Media Library"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
120 |
msgctxt "Show the support tab"
|
121 |
msgid "Support"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
125 |
#, php-format
|
126 |
msgid "The file %s has been given %s permissions on Amazon S3."
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
130 |
msgid "Quick Start Guide"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
134 |
#, php-format
|
135 |
msgid ""
|
136 |
"Looks like we don't have write access to this bucket. It's likely that the "
|
@@ -139,7 +139,7 @@ msgid ""
|
|
139 |
"correctly."
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: classes/amazon-s3-and-cloudfront.php:
|
143 |
#, php-format
|
144 |
msgid ""
|
145 |
"Looks like we don't have access to the buckets. It's likely that the user "
|
@@ -148,6 +148,7 @@ msgid ""
|
|
148 |
msgstr ""
|
149 |
|
150 |
#: classes/as3cf-plugin-compatibility.php:357
|
|
|
151 |
#, php-format
|
152 |
msgid "There was an error attempting to download the file %s from S3: %s"
|
153 |
msgstr ""
|
@@ -201,6 +202,11 @@ msgid ""
|
|
201 |
"items and the total space used in Multisite subsites."
|
202 |
msgstr ""
|
203 |
|
|
|
|
|
|
|
|
|
|
|
204 |
#: classes/upgrades/as3cf-region-meta.php:36
|
205 |
msgid ""
|
206 |
"and updating the metadata with the bucket region it is served from. This "
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: amazon-s3-and-cloudfront\n"
|
10 |
"Report-Msgid-Bugs-To: nom@deliciousbrains.com\n"
|
11 |
+
"POT-Creation-Date: 2015-09-01 09:58+0100\n"
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
25 |
msgid "S3 and CloudFront"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: classes/amazon-s3-and-cloudfront.php:521
|
29 |
#, php-format
|
30 |
msgid "File %s does not exist"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: classes/amazon-s3-and-cloudfront.php:530
|
34 |
#, php-format
|
35 |
msgid "Mime type %s is not allowed"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: classes/amazon-s3-and-cloudfront.php:607
|
39 |
#, php-format
|
40 |
msgid "Error uploading %s to S3: %s"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: classes/amazon-s3-and-cloudfront.php:1247
|
44 |
msgid "Cheatin’ eh?"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: classes/amazon-s3-and-cloudfront.php:1251
|
48 |
msgid "You do not have sufficient permissions to access this page."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: classes/amazon-s3-and-cloudfront.php:1257
|
52 |
msgid "No bucket name provided."
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: classes/amazon-s3-and-cloudfront.php:1532
|
56 |
msgid "Error Getting Bucket Region"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: classes/amazon-s3-and-cloudfront.php:1533
|
60 |
#, php-format
|
61 |
msgid "There was an error attempting to get the region of the bucket %s: %s"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: classes/amazon-s3-and-cloudfront.php:1653
|
65 |
msgid ""
|
66 |
"This is a test file to check if the user has write permission to S3. Delete "
|
67 |
"me if found."
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: classes/amazon-s3-and-cloudfront.php:1685
|
71 |
#, php-format
|
72 |
msgid ""
|
73 |
"There was an error attempting to check the permissions of the bucket %s: %s"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: classes/amazon-s3-and-cloudfront.php:1743
|
77 |
msgid "Error creating bucket"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: classes/amazon-s3-and-cloudfront.php:1744
|
81 |
msgid "Bucket name too short."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: classes/amazon-s3-and-cloudfront.php:1745
|
85 |
msgid "Bucket name too long."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: classes/amazon-s3-and-cloudfront.php:1746
|
89 |
msgid ""
|
90 |
"Invalid character. Bucket names can contain lowercase letters, numbers, "
|
91 |
"periods and hyphens."
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: classes/amazon-s3-and-cloudfront.php:1747
|
95 |
msgid "Error saving bucket"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: classes/amazon-s3-and-cloudfront.php:1748
|
99 |
msgid "Error fetching buckets"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: classes/amazon-s3-and-cloudfront.php:1749
|
103 |
msgid "Error getting URL preview: "
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: classes/amazon-s3-and-cloudfront.php:1750
|
107 |
msgid "The changes you made will be lost if you navigate away from this page"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: classes/amazon-s3-and-cloudfront.php:1808
|
111 |
msgid "Cheatin' eh?"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: classes/amazon-s3-and-cloudfront.php:1911
|
115 |
msgctxt "Show the media library tab"
|
116 |
msgid "Media Library"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: classes/amazon-s3-and-cloudfront.php:1912
|
120 |
msgctxt "Show the support tab"
|
121 |
msgid "Support"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: classes/amazon-s3-and-cloudfront.php:2048
|
125 |
#, php-format
|
126 |
msgid "The file %s has been given %s permissions on Amazon S3."
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: classes/amazon-s3-and-cloudfront.php:2549
|
130 |
msgid "Quick Start Guide"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: classes/amazon-s3-and-cloudfront.php:2551
|
134 |
#, php-format
|
135 |
msgid ""
|
136 |
"Looks like we don't have write access to this bucket. It's likely that the "
|
139 |
"correctly."
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: classes/amazon-s3-and-cloudfront.php:2553
|
143 |
#, php-format
|
144 |
msgid ""
|
145 |
"Looks like we don't have access to the buckets. It's likely that the user "
|
148 |
msgstr ""
|
149 |
|
150 |
#: classes/as3cf-plugin-compatibility.php:357
|
151 |
+
#: classes/upgrades/as3cf-meta-wp-error.php:72
|
152 |
#, php-format
|
153 |
msgid "There was an error attempting to download the file %s from S3: %s"
|
154 |
msgstr ""
|
202 |
"items and the total space used in Multisite subsites."
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: classes/upgrades/as3cf-meta-wp-error.php:38
|
206 |
+
msgid ""
|
207 |
+
"and rebuilding the metadata for attachments that may have been corrupted."
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
#: classes/upgrades/as3cf-region-meta.php:36
|
211 |
msgid ""
|
212 |
"and updating the metadata with the bucket region it is served from. This "
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: bradt, deliciousbrains
|
|
3 |
Tags: uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 4.3
|
6 |
-
Stable tag: 0.9.
|
7 |
License: GPLv3
|
8 |
|
9 |
Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
|
@@ -63,6 +63,9 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
|
|
63 |
|
64 |
== Changelog ==
|
65 |
|
|
|
|
|
|
|
66 |
= 0.9.4 - 2015-08-27 =
|
67 |
* New: Update all existing attachments with missing file sizes when the 'Remove Files From Server' option is enabled (automatically runs in the background)
|
68 |
* Improvement: Show when constants are used to set bucket and region options
|
@@ -72,7 +75,7 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin
|
|
72 |
* Bug fix: Unable to crop header images when the 'Remove Files From Server' option is enabled
|
73 |
* Bug fix: Incorrect storage space shown on Multisite installs when the 'Remove Files From Server' option is enabled
|
74 |
* Bug fix: Upload attempted to non existent bucket when defined by constant
|
75 |
-
* Bug fix: 'SignatureDoesNotMatch' error shown when using signed URLs with bucket names containing '.' characters
|
76 |
|
77 |
= 0.9.3 - 2015-08-17 =
|
78 |
* New: Pro upgrade sidebar
|
3 |
Tags: uploads, amazon, s3, mirror, admin, media, cdn, cloudfront
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 4.3
|
6 |
+
Stable tag: 0.9.5
|
7 |
License: GPLv3
|
8 |
|
9 |
Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery.
|
63 |
|
64 |
== Changelog ==
|
65 |
|
66 |
+
= 0.9.5 - 2015-09-01 =
|
67 |
+
* Bug fix: Fatal error: Cannot use object of type WP_Error as array
|
68 |
+
|
69 |
= 0.9.4 - 2015-08-27 =
|
70 |
* New: Update all existing attachments with missing file sizes when the 'Remove Files From Server' option is enabled (automatically runs in the background)
|
71 |
* Improvement: Show when constants are used to set bucket and region options
|
75 |
* Bug fix: Unable to crop header images when the 'Remove Files From Server' option is enabled
|
76 |
* Bug fix: Incorrect storage space shown on Multisite installs when the 'Remove Files From Server' option is enabled
|
77 |
* Bug fix: Upload attempted to non existent bucket when defined by constant
|
78 |
+
* Bug fix: 'SignatureDoesNotMatch' error shown when using signed URLs with bucket names containing '.' characters
|
79 |
|
80 |
= 0.9.3 - 2015-08-17 =
|
81 |
* New: Pro upgrade sidebar
|
wordpress-s3.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Offload S3
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/
|
5 |
Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery.
|
6 |
Author: Delicious Brains
|
7 |
-
Version: 0.9.
|
8 |
Author URI: http://deliciousbrains.com/
|
9 |
Network: True
|
10 |
Text Domain: as3cf
|
@@ -26,7 +26,7 @@ Domain Path: /languages/
|
|
26 |
// Then completely rewritten.
|
27 |
*/
|
28 |
|
29 |
-
$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '0.9.
|
30 |
|
31 |
$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['supported_addon_versions'] = array(
|
32 |
'amazon-s3-and-cloudfront-pro' => '1.0b1',
|
@@ -57,6 +57,7 @@ function as3cf_init( $aws ) {
|
|
57 |
require_once $abspath . '/classes/as3cf-upgrade.php';
|
58 |
require_once $abspath . '/classes/upgrades/as3cf-region-meta.php';
|
59 |
require_once $abspath . '/classes/upgrades/as3cf-file-sizes.php';
|
|
|
60 |
require_once $abspath . '/classes/as3cf-plugin-compatibility.php';
|
61 |
require_once $abspath . '/classes/amazon-s3-and-cloudfront.php';
|
62 |
$as3cf = new Amazon_S3_And_CloudFront( __FILE__, $aws );
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/
|
5 |
Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery.
|
6 |
Author: Delicious Brains
|
7 |
+
Version: 0.9.5
|
8 |
Author URI: http://deliciousbrains.com/
|
9 |
Network: True
|
10 |
Text Domain: as3cf
|
26 |
// Then completely rewritten.
|
27 |
*/
|
28 |
|
29 |
+
$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '0.9.5';
|
30 |
|
31 |
$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['supported_addon_versions'] = array(
|
32 |
'amazon-s3-and-cloudfront-pro' => '1.0b1',
|
57 |
require_once $abspath . '/classes/as3cf-upgrade.php';
|
58 |
require_once $abspath . '/classes/upgrades/as3cf-region-meta.php';
|
59 |
require_once $abspath . '/classes/upgrades/as3cf-file-sizes.php';
|
60 |
+
require_once $abspath . '/classes/upgrades/as3cf-meta-wp-error.php';
|
61 |
require_once $abspath . '/classes/as3cf-plugin-compatibility.php';
|
62 |
require_once $abspath . '/classes/amazon-s3-and-cloudfront.php';
|
63 |
$as3cf = new Amazon_S3_And_CloudFront( __FILE__, $aws );
|