Using fine-uploader and the following php s3 endpoint template file:
The image uploads successfully on the s3 bucket but i cannot get any response back (for example to get the tempLink) in my:
}).on('complete', function(event, id, name, response) {
console.dir(response);
});
I get the following fatal error:
[Fine Uploader 4.4.0] Submitting upload success request/notification for 0
[Fine Uploader 4.4.0] Sending POST request for 0
[Fine Uploader 4.4.0] Received the following response body to an upload success request for id 0: <br />
<b>Fatal error</b>: Uncaught Aws\S3\Exception\S3Exception: AWS Error Code: , Status Code: 301, AWS Request ID: 7103DD45F997003C, AWS Error Type: client, AWS Error Message: 301 Moved Permanently (Request-ID: 7103DD45F997003C), User-Agent: aws-sdk-php2/2.6.3 Guzzle/3.9.1 curl/7.24.0 PHP/5.3.28
thrown in <b>/xxxxx/aws/Aws/Common/Exception/NamespaceExceptionFactory.php</b> on line <b>91</b><br />
[Fine Uploader 4.4.0] Upload success was acknowledged by the server.
Which points to this file in the php aws sdk:
aws/Aws/Common/Exception/NamespaceExceptionFactory.php
/**
* Create an prepare an exception object
*
* @param string $className Name of the class to create
* @param RequestInterface $request Request
* @param Response $response Response received
* @param array $parts Parsed exception data
*
* @return \Exception
*/
protected function createException($className, RequestInterface $request, Response $response, array $parts)
{
$class = new $className($parts['message']);
if ($class instanceof ServiceResponseException) {
$class->setExceptionCode($parts['code']);
$class->setExceptionType($parts['type']);
$class->setResponse($response);
$class->setRequest($request);
$class->setRequestId($parts['request_id']);
}
return $class;
}