Extension:LocalS3Repo

The LocalS3Repo extension implements the Amazon S3 as a filerepo. The local model was used as a base, and the wiki will use the S3 instead of the local disk drive for the storage of all uploaded files.

Usage
Once installed, it will operate automatically. There are no user interface issues. You have to have an account with Amazon S3, explained here.

Download instructions

 * Version by antonydandrea stable for 1.28m may work for 1.21+: repository.
 * Version by Cariaso for 1.23+ (note from the author: ''I'm the author of that, and can warn you that while it mostly works, it's a bit crashy'): repository.
 * Very old version: LocalS3Repo.zip.

Choose a version, download and unzip it to, with folders. The files should be in the  directory. Note: stands for the root directory of your MediaWiki installation, the same directory that holds .

Installation
Below are 2 versions of what should be added to the bottom of your file. Believe the first one will work from v1.21 onwards as much as the second one, as well as the code it is attached to. This repository should be tagged if not.

To transfer your files from an existing wiki:
 * Create the bucket and the "folder" (the S3Fox tool for FireFox works well for this)
 * Transfer all the files/folders in your existing wiki's image directory to your "folder".
 * Set the ACL for the folder (and subfolders, etc) to be readable by everyone, if you do not use authentication

I have tested this with Windows 7 and with Linux, with Mediawiki versions 1.15.4 and 1.16.0beta3. I currently have a wiki running on Linux with this extension. I have tested the funcionality of upload, thumbnails, delete, archive, and rollback. There could be some other functions which some other extensions use which I didn't implement or test, watch out!

This extension isn't by any means perfect, because the files are sent first to the wiki server, and from there they are sent to the S3 system on uploads. On file reading, they come directly from the S3 system, which is correct. I am waiting for a new upload screen which has a progress bar, then I will implement sending the files directly to the S3 system on upload. So for now, the file size limit of your PHP server will be the file size limit. I deal with that on my system by doing it manually, because I have few files larger than the limit.

Note that the S3.php file, from Donovan Schönknecht, is included in the zip file, and requires that curl be installed on your PHP server (check your phpinfo).

Configuration

 * $wgUploadS3Bucket --> The name of the bucket you created for the wiki
 * $wgUploadDirectory --> The "folder" under the bucket where you wish the files to be stored
 * $wgUploadS3SSL --> true if SSL should be used
 * $wgPublicS3 --> true if public S3 file access, false if signature authentication should be used
 * 'AWS_ACCESS_KEY' --> Your S3 access key, a long string of characters assigned by Amazon
 * 'AWS_SECRET_KEY' --> -Your S3 secret key, a long string of characters assigned by Amazon

Note

 * There are issues using this extension together with Semantic MediaWiki - See issue 1653 on GitHub