Hi, I need to upload a given image using Amazon S3
I have this PHP:
<?
$uploaddir = 'images/';
$file = basename($_FILES['userfile']['name']);
$uploadfile = $uploaddir . $file;
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "Data Uploaded Successfully";
} else {
echo "ERROR";
}
?>
but it gives me this error:
<?xml version="1.0" encoding="UTF-8" ?>
<Error>
<Code>MethodNotAllowe</Code>
<Message>The specified method is not allowed against this resource.</Message>
<ResourceType>OBJECT</ResourceType>
<Method>POST</Method>
....
<AllowedMethod>PUT</AllowedMethod>
....
</Error>
How can I upload a file?