I4m uploading with PHP objects to S3. I'd like to only accept PDF files and refuse files with other extensions.
So I wrote this bucket policy :
{
"Version": "2012-10-17",
"Id": "Policy1464968545158",
"Statement": [
{
"Sid": "Stmt1464968483619",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::MYBUCKET/*.pdf"
}
]
}
But it's not working, my bucket still accepts files with any extensions.
What did I do wrong ?
Thank you