amazon s3 - AWS S3 - Only allow upload of a specific filetype -


we have s3 bucket want allow storage of jpegs in. have tried following:

{ "version": "2012-10-17", "id": "policy1503081741147", "statement": [     {         "sid": "stmt1503081356005",         "effect": "allow",         "principal": "*",         "action": "s3:putobject",         "resource": "arn:aws:s3:::bucket-test/*.jpg"     } ] } 

however not work; still able upload csvs, etc. tried 2 statements in policy: 1 denying files ("resource": "arn:aws:s3:::bucket-test/*") , 1 allowing jpegs, did not work either 'deny' seemed overwrite 'allow' , couldn't upload anything. has been able configure bucket policy similar this?


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -