- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hi, When you create a presigned URL for uploading an object to S3 and include the Content-MD5 header in the PutObjectRequest, it means that AWS will expect the uploaded object to have the same MD5 hash as the one provided in the Content-MD5 header. If the uploaded object's MD5 hash doesn't match the expected value, AWS will reject the request.
However, it's essential to ensure that the Content-MD5 header is included both during the presigned URL creation and in the actual PUT request made to S3. If the Content-MD5 header is missing in the PUT request, S3 won't perform the integrity check, and the upload will succeed regardless of the object's MD5 hash.
Therefore, to enforce the integrity check:
- Include the Content-MD5 header when creating the presigned URL.
- Include the Content-MD5 header in the PUT request made using the presigned URL.
By doing so, AWS will verify that the uploaded object's MD5 hash matches the expected value, providing an additional layer of integrity verification for your uploads.
Contenus pertinents
- Réponse acceptéedemandé il y a 2 ans
- demandé il y a un an
- demandé il y a 3 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
Hi Hari Priya, Thank you for the response. So this means that if I were to actually provide the original Content-MD5 header in the PUT request, but try to upload a different image in the body/payload then S3 will not allow that and it would fail?