Plugin Directory

Changeset 491999


Ignore:
Timestamp:
01/19/2012 09:39:52 AM (14 years ago)
Author:
atvdev
Message:
 
Location:
amazon-s3-uploads/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • amazon-s3-uploads/trunk/asssu.php

    r491899 r491999  
    9898
    9999    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';
    101101        $adapter = new S3($access_key, $secret_key, $use_ssl);
    102         $buckets = @$adapter->listBuckets();
     102        $buckets = S3::listBuckets();
    103103        if (is_array($buckets) && in_array($bucket_name, $buckets))
    104104            return true;
     
    107107   
    108108    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       
    109113        $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.'/';
    111118        if (!empty($this->bucket_subdir)) {
    112119            $amazon_path .= $this->bucket_subdir.'/';
  • amazon-s3-uploads/trunk/readme.txt

    r477750 r491999  
    55Requires at least: 2.3
    66Tested up to: 3.3
    7 Stable tag: 1.0
     7Stable tag: 1.02
     8
     9Moves your uploads to Amazon S3 via cron jobs.
    810
    911== Description ==
    10 Moves your uploads to Amazon S3 via cron jobs.
     12Hi,
     13Amazon 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
     15Be 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.
    1116
    1217== Installation ==
     
    2227Any 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.
    2328
    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? =
     30If 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.
    2631
    2732= Should I modify any code in wordpress? =
     
    3136No. You cannot manage the files in Amazon S3 using this plugin.
    3237
    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? =
     39If 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.
     40http://example.com/wp-content/uploads/2011/10/some_file.jpg
     41on Amazon S3 it is stored
     42{amazon_bucket_name}/{chosen_subdirectory}/2011/10/some_file.jpg
    3543
    3644== Changelog ==
    3745
    38 = Version: 1.0 Dated: 19-Dec-2011 =
     46= Version: 1.01 Dated: 19-Dec-2011 =
    3947* First version of the plugin
    4048
    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
    4352
    4453== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.