Content Type Error
Overview
This article covers the incorrect Content-Type metadata you may see when examining S3 object properties for files uploaded to S3 via SFTP Gateway.
This issue will be fixed in version 3.3.0
of SFTP Gateway.
The Issue
Content-Type is meant to show the media-type of a file. For example, if a PNG file were uploaded, the Content-Type would be image/png
.
Instead, the Content-Type is being set to binary/octet-stream
or application/octet-stream
. This is a result of the way we transfer files to S3 (which is via a Java application using the AWS SDK).
The issue is the Content Type always being set to octet-stream. Although Java and the AWS SDK uses octet-stream to upload the files to S3, unfortunately our code is missing a step to set the Content Type back to its original value. This should be fixed in the next update, which will release in April 2022.
Here is a image of what the error looks like within the S3 console: