putObject($s3->inputFile($file), $bucketName, $s3Filename, S3::ACL_PUBLIC_READ)) { $array = array( 'filelink' => 'http://'.$endpoint.'/'.$bucketName.'/'.$s3Filename ); // echo stripslashes(json_encode($array)); // Required: anonymous function reference number as explained above. $funcNum = $_GET['CKEditorFuncNum'] ; // Optional: instance name (might be used to load a specific configuration file or anything else). $CKEditor = $_GET['CKEditor'] ; // Optional: might be used to provide localized messages. $langCode = $_GET['langCode'] ; // Check the $_FILES array and save the file. Assign the correct path to a variable ($url). $url = APP_PATH.'/uploads/'.$time.'.'.$extension; $url = 'http://'.$endpoint.'/'.$bucketName.'/'.$s3Filename; // Usually you will only assign something here if the file could not be uploaded. $message = ''; echo ""; } else { die('there was a problem'); } } else { die('File not allowed'); } ?>