Changeset 491999
- Timestamp:
- 01/19/2012 09:39:52 AM (14 years ago)
- Location:
- amazon-s3-uploads/trunk
- Files:
-
- 2 edited
-
asssu.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
amazon-s3-uploads/trunk/asssu.php
r491899 r491999 98 98 99 99 function check_sss($access_key, $secret_key, $use_ssl, $bucket_name) { 100 require_once dirname(__FILE__).DIRECTORY_SEPARATOR.' s3-php5-curl'.DIRECTORY_SEPARATOR.'S3.php';100 require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'tpyo-amazon-s3-php-class'.DIRECTORY_SEPARATOR.'S3.php'; 101 101 $adapter = new S3($access_key, $secret_key, $use_ssl); 102 $buckets = @$adapter->listBuckets();102 $buckets = S3::listBuckets(); 103 103 if (is_array($buckets) && in_array($bucket_name, $buckets)) 104 104 return true; … … 107 107 108 108 function check_htaccess() { 109 require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'tpyo-amazon-s3-php-class'.DIRECTORY_SEPARATOR.'S3.php'; 110 $bucket_name = get_option('asssu_bucket_name'); 111 $location = S3::getBucketLocation($bucket_name); 112 109 113 $amazon_path = 'http://'.$this->bucket_name.'.s3.amazonaws.com/'; 110 $amazon_path_ssl = 'https://'.$this->bucket_name.'.s3.amazonaws.com/'; 114 if ($location === 'EU') 115 $amazon_path_ssl = 'https://'.$this->bucket_name.'.s3.amazonaws.com/'; 116 else 117 $amazon_path_ssl = 'https://s3.amazonaws.com/'.$this->bucket_name.'/'; 111 118 if (!empty($this->bucket_subdir)) { 112 119 $amazon_path .= $this->bucket_subdir.'/'; -
amazon-s3-uploads/trunk/readme.txt
r477750 r491999 5 5 Requires at least: 2.3 6 6 Tested up to: 3.3 7 Stable tag: 1.0 7 Stable tag: 1.02 8 9 Moves your uploads to Amazon S3 via cron jobs. 8 10 9 11 == Description == 10 Moves your uploads to Amazon S3 via cron jobs. 12 Hi, 13 Amazon S3 Uploads does exactly what you ask, it uploads all you content from http://www.example.com/wp-content/uploads/ to Amazon S3, deletes the uploaded files from your server and everytime that a file like http://www.example.com/wp-content/uploads/file.jpg is requested, it automaticaly redirects to the file that is on Amazon S3. 14 15 Be aware that files from your server are uploaded to the Amazon S3 via cron job and not immediately. So you will have to wait some minutes (around 10) to see results. 11 16 12 17 == Installation == … … 22 27 Any file in the uploads directory will be moved to Amazon S3 with a relative path to it's current. Any uploaded file requested, if not present in the uploads directory, will be redirected to Amazon S3. Your uploads urls remain without any change. 23 28 24 = If I de-activate this plugin will it affect my blog? =25 No. Your new uploads will be stored at uploads directory and any files that are already on the Amazon S3 server will be read from there.29 = What happens if I choose to disable this plugin. Does my blog now have NO images? Or does it just not continue the cronjob in the future? = 30 If you turn off the plugin, the cron job will stop, images that are already on the Amazon S3 remain there and are streamed from Amazon, new images that you will upload will be stored on your server and streamed from your server. 26 31 27 32 = Should I modify any code in wordpress? = … … 31 36 No. You cannot manage the files in Amazon S3 using this plugin. 32 37 33 = How can I move all my uploaded files from Amazon S3 to blog's upload directory? = 34 You must download everything from your Amazon S3 bucket to your uploads directory. Directories on Amazon S3 are mainaned the same as in your uploads directory. 38 = What should I do if I want to stop using Amazon S3? = 39 If you want all your files to be again on your server, you will have to manually download them from Amazon S3 selected bucket (and subfolder if applied) to your uploads folder. Folders on your server and on Amazon S3 are maintained the same eg. 40 http://example.com/wp-content/uploads/2011/10/some_file.jpg 41 on Amazon S3 it is stored 42 {amazon_bucket_name}/{chosen_subdirectory}/2011/10/some_file.jpg 35 43 36 44 == Changelog == 37 45 38 = Version: 1.0 Dated: 19-Dec-2011 =46 = Version: 1.01 Dated: 19-Dec-2011 = 39 47 * First version of the plugin 40 48 41 == Upgrade Notice == 42 No upgrade notices available 49 = Version: 1.02 Dated: 19-Jan-2011 = 50 * Upgraded Amazon S3 php class 51 * Fixed SSL/HTTPS issue 43 52 44 53 == Screenshots ==
Note: See TracChangeset
for help on using the changeset viewer.