Skip to content

.PPTM Powerpoint file extension changing to zip when downloading from S3

0

When uploading a Powerpoint file with PPTM file extension, into my s3 bucket it is changing the file extension to .zip when I download the file from S3. I can clearly see the file is stored in s3 with the correct .pttm file extension. I have tried multiple files with the pptm file extension and I get the same result each time. What is puzzling too is that there are no issues for files with the more common powerpoint file extension PPTX, they (and all other file types in my s3 bucket) are correctly preserving the file extension when I download.

Note I am not using AWS Lambda and do not have any settings related to file extensions or file type in my bucket policy.

asked 10 months ago50 views
1 Answer
0

The behavior you're experiencing with .pptm files changing to .zip when downloading from S3 is not a standard S3 behavior. S3 typically stores and retrieves files as-is without modifying content or file extensions. However, there are a few potential explanations and solutions to consider:

  1. Content-Type Metadata: S3 may be incorrectly identifying the MIME type of .pptm files. Check the Content-Type metadata for these objects in S3. If it's set to "application/zip" instead of "application/vnd.ms-powerpoint.presentation.macroEnabled.12", this could cause the issue.

  2. Browser Behavior: Some web browsers might interpret the file as a zip file based on its content rather than its extension. Try downloading using the AWS CLI or SDK to see if the issue persists.

  3. Compression Settings: Ensure that you haven't accidentally enabled any compression settings for .pptm files in your upload process.

  4. S3 Transfer Acceleration: If you're using S3 Transfer Acceleration, disable it temporarily to see if it's affecting the file extension.

To resolve this issue:

  1. When uploading .pptm files, explicitly set the Content-Type metadata to "application/vnd.ms-powerpoint.presentation.macroEnabled.12".

  2. Use the --content-type parameter with the AWS CLI when uploading: aws s3 cp file.pptm s3://your-bucket/ --content-type "application/vnd.ms-powerpoint.presentation.macroEnabled.12"

  3. If using SDK or custom code for uploads, ensure you're setting the correct Content-Type.

  4. Double-check any pre-processing or post-processing steps in your workflow that might be affecting these specific files.

If the issue persists after trying these solutions, you may need to contact AWS Support for further investigation, as this behavior is not typical for S3 operations.
Sources
XLSX file upload to s3 bucket creates additional enc files | AWS re:Post
AWS S3 tar.gz compressed files issue after download from S3 | AWS re:Post
Why does S3 objects download in gzip ContentEncoding via CLI? | AWS re:Post

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.