Knowledge base

Troubleshooting CDN77 Object Storage

Recommended versions of tools

Some versions of s3cmd and s5cmd are guessing MIME type during upload, resulting in incorrect MIME type.

To prevent this issue, use the following versions:

  • s3cmd 2.2.0 or higher
  • s5cmd 1.2.0 or higher

Content-Type

In case you are having issues with a file displaying incorrectly or, in most cases, automatically downloading, it is most likely that the file has an incorrectly set content-type header (MIME type).

To fix this issue, you can manually set the header for all files with the same file type using any of the tools used to connect to the CDN77 Object storage.

Here are some examples of changing the MIME type on your files using various tools:

AWS CLI (example with MP4 file)

aws s3 --endpoint-url=http://eu-1.cdn77-storage.com cp s3://bucketname/ s3://bucketname/ --exclude "*" --include "*.mp4" --recursive --metadata-directive REPLACE --content-type video/mp4

Cyberduck (example with MP4 file)

  • Right-click on the file
  • Select Info
  • In the bottom left corner, click the button and choose the Content-Type option

Double-click the field under the Value column and type in the according value based on the MIME type of the file

Content-Encoding

Similarly to the content-type header, you may receive a 502 status code when requesting a file from the CDN77 Object storage in some cases.
This is usually caused by the uploading tool incorrectly setting the header to a value other than none—generally gzip or br (brotli) values.

To fix this issue, you can manually set the header for all files with the same file type using any of the tools used to connect to the CDN77 Object storage.


AWS CLI

aws s3 cp --endpoint-url=http://eu-1.cdn77-storage.com s3://bucketname s3://bucketname --recursive --metadata-directive REPLACE --content-encoding="none"

Cyberduck

  • Right-click on the file
  • Select Info
  • In the bottom left corner, click the "…" button and choose the Custom header option

Double-click the left field and type in 'Content-Encoding';in the right field, type in 'none'

NoBucketWebsiteConfiguration

If you encounter this error, it means that the bucket WebsiteConfiguration is missing or misconfigured.
To generate the WebsiteConfiguration file, you can either use our Object Storage API, as mentioned in the Bucket Website article, or you can use the Cyberduck GUI tool:

  1. Connect to the CDN77 Object Storage using the Master credentials–custom keys cannot list buckets.
  2. Right-click on the bucket that you wish to configure.
  3. Click on “Info” and head over to the “Distribution (CDN)” tab.
  4. Select the “Enable Website Configuration (HTTP) Distribution”.
Can’t find what you are looking for?