Hi I am hoping someone can help me to understand why I am getting varied results with some PHP code I have written to upload files to S3 then call an EC2 instance to perform actions on the uploaded file.
Here is the order i do things -
1) use S3 class to put file
$result = s3 -> putObjectFile($uploadDIR, $bucket, $name, S3::ACL)
2) check $result
if($result == "1") {
//file made it to s3
3) use cURL to call EC2 instance and perform action on file in S3
I am using this with video files, when I upload a small video file it works ok (eg 3MB) but for larger video (eg 80MB) the code doesnt seem to get past step 1. The file is moved to s3 ok but my guess is that after a while PHP gives up waiting to see if $result == 1 and so does not execute the rest of the code.
What is the best way to handle something like this? How can I detect that the file has been uploaded to S3 and then run some code when it has?
many thanks Stephen