Manage content types
The content type catalog maps file extensions to MIME types, such as txt to text/plain. S3Client uses these mappings to set Content-Type for local uploads to S3 and to select preview handling. An extension missing from the catalog is uploaded with application/octet-stream.
Mappings use the filename’s final suffix, ignoring case: archive.tar.gz uses gz, and PHOTO.JPG uses jpg.
Editing the catalog does not rewrite metadata on existing S3 objects. To change their Content-Type, use object properties.
Add or edit a mapping
- Open Tools > Content types…. The Content types dialog has Extension, Content type, and Text columns.
- Click Add to the right of the list to create a mapping. To edit one, select its row and click Edit, double-click the row, or press F2.
- In the Content type editor, enter Extension without a dot or path, for example
json. Leading and trailing whitespace is removed; spaces within the extension, dots, and path separators are not accepted. Extensions are stored in lowercase and must be unique. - Enter a valid MIME type in Content type, such as
application/jsonortext/plain; charset=utf-8. - Review the Text content setting. It specifies whether this MIME type should be treated as text.
- Click OK in the editor. The row appears in the catalog, sorted by extension.
- Click OK in the main Content types dialog to save all your changes.
Invalid input disables OK in the editor. The extension ‘…’ already exists. indicates a duplicate: edit the existing row or choose another extension.
Choose text handling
When you enter a MIME type, Text content uses its existing classification, if known, or the default classification. Types matching text/*, types ending in +json or +xml, and common types such as application/json and application/xml are classified as text by default. You can change this checkbox.
The text property is shared by every extension mapped to the same MIME type, ignoring case and parameters such as charset. Changing it for one mapping therefore changes the other mappings for that type.
This property enables text previews for the associated extensions without changing the files. PDFs, recognized images and media keep their dedicated viewers, even when Text content is enabled. Playlists and manifests such as m3u8 are displayed as text when classified as text; their resources are not opened automatically. See previews and their limits.
Delete mappings or restore the catalog
- In Tools > Content types…, select one or more rows using Ctrl or Shift.
- Click Delete on the right, choose Delete from the context menu, or use the delete key.
- Confirm in Delete content types.
- Click OK in the main dialog to save the catalog.
Restore Defaults replaces the entire list with the catalog supplied with S3Client, including text properties. This removes customizations from the list being edited; check the result before clicking OK.
Cancel in the main dialog discards all changes from the editing session, including deletions and restoring defaults. If Unable to save content types appears, the catalog used by S3Client has not changed: correct the reported problem and try saving again.