MOD name: Amazon S3 Simple Storage
MOD description: Allows you to use Amazon s3 for attachment storage
MOD version: dev - 0.0.0
More info:
I've been working on this for the past week because of a need for my website. I've seem numerous requests to have code on how to do this, so I wanted to share my progress/ideas.
I pretty much hacked around to get this to work, so I claim nothing. This is DEV code, use at your own risk.
This code was designed for Images, but could be easily modified for other attachments.
This code will:
Upload a file and thumbnail to Amazon S3 Service.
Delete a file, and thumb, if the user presses "delete file" before submitting the post.
Delete the file, and thumb, if the post is deleted.
The file/code to display the photo inline within a thread was hacked to make it work. Basically it will expose the raw file name.
A few "gotchas":
1.) The uploaded files are not deleted off the local HDD. I may add this, but for the time you can just run a cron job to delete all files.
2.) You need PHP5 installed on the server.
3.) You need PHP5-CURL installed.
4.) See the readme.txt for additional files needed.
5.) The code hardcodes the file type to jpeg/image, however it appears to work with PNG, GIF, and other file types.
Comments welcome!
http://mmorgensen.s3.amazonaws.com/phpbb3-s3-0.0.0.zip