Skip to content

PHP Class that let's you integrate a simple, configurable image uploader to your Amazon S3 bucket

Notifications You must be signed in to change notification settings

teo-sk/PHP-Amazon-S3-Image-Uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Amazon S3 Image Uploader

PHP Class that lets you integrate a simple, configurable image uploader to your Amazon S3 bucket

Configuration

First, you need to set up your Amazon S3 credentials in lib/amazon_sdk/config.inc.php file. Then, you can configure the uploader in inc/init.php file. @todo - split to config + init

Usage

Uploading

This class is using jQuery Uploadify library for handling the front-end part of the uploading. It uses AJAX to communicate with server-side script, that actually uses the uploader class. Of course, you can use your own front-end solution as well. So the whole code needed to use this class is in ajax/upload.php file, and is this simple:

$uploader = new Uploader($uid);
$uploader->upload();

Where the $uid variable comes from your application, and represents for example the ID of a user currently logged in and uploading. This will cause all the files go to a directory of this user.

Browsing the S3 Bucket

The class also comes with a set of FTP-like methods that you can use to browse through the uploaded files in your Amazon S3 bucket. You can navigate your browser to the ftp.php file to see an example of usage.

About

PHP Class that let's you integrate a simple, configurable image uploader to your Amazon S3 bucket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages