We are using S3 for our image upload process. We approve all the images that are uploaded on our website. The process is like:
- Clients upload images on S3 from javascript at a given path. (using token)
- Once, we get back the url from S3, we save the S3 path in our database with 'isApproved flag false' in photos table.
- Once the image is approved through our executive, the images start displaying on our website.
The problem is that the user may change the image (to some obscene image) after the approval process through the token generated. Can we somehow stop users from modifying the images like this?
One temporary fix is to shorten the token lifetime interval i.e. 5 minutes and approve the images after that interval only.
I saw this but didn't help as versioning is also replacing the already uploaded image and moving previously uploaded image to new versioned path.
Any better solutions?