Depending on what your scripts do, you may have to change them a bit.
I should state first of all that I have never done this, so I could be missing some details, but from my experience with PHP, Heroku and S3, it should be as simple as accepting the uploaded file (which will be stored in a temporary directory somewhere on Heroku's server), resize it, and finally upload it to S3.
If you already had an upload workflow working, the only difference should be that instead of saving the file to a directory in your server (which, from what you say, was actually a sort of a symlink to an S3 bucket), you will now upload it to S3. You can do this easily with this library: https://github.com/tpyo/amazon-s3-php-class
Something like this:
// Ink is expensive, let's write less
$file = $_FILES['uploadedfile']['tmp_name'];
$name = $_FILES['pictures']['name'];
// Resize the image
resize($file);
// Normally you would do this for storing the file locally
// move_uploaded_file($file, "$destinationdir/$name");
// Now you want to upload to S3
$s3 = new S3($awsAccessKey, $awsSecretKey);
$s3->putObject($s3->inputFile($file, false), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
Depending on how you organise your uploads, you may also want to keep a record of the bucket name and the file name, maybe in a database table where you can search for the file name and get the bucket name, because you will need both to retrieve the file.
this link provide step by step instruction how to upload files to amazon s3. please check out this link. – Jaykesh Patel Dec 24 '12 at 10:28