Apply Default HTTP Headers to Amazon S3 Uploads with TntDrive Using Bucket and File Masks
TntDrive
Bringing the Cloud Closer
 
Follow

Apply Default HTTP Headers to Amazon S3 Uploads

Default HTTP Headers let TntDrive automatically add predefined HTTP headers when it uploads or creates objects in Amazon S3. Each rule contains a bucket mask, a remote file mask, a header name, and a header value.

Rules affect new or overwritten objects. They do not retroactively change the headers or metadata of existing objects.

All enabled rules whose bucket and remote file masks match an object are applied. If several matching rules set the same header, the rule lower in the list takes precedence.

Bucket and remote file masks support * for any sequence of characters and ? for one character. Matching in TntDrive is case-insensitive. Leave a mask empty to match all buckets or files.

Rules can set standard headers such as Content-Type, Cache-Control, Content-Disposition, and Expires, Amazon S3 request headers, and user-defined metadata. User-defined metadata names must begin with x-amz-meta-.

TntDrive drive settings can override corresponding rule values. Configured storage class and server-side encryption settings are applied after Default HTTP Headers. TntDrive also removes x-amz-acl when permission inheritance or preservation is enabled.

Add a default HTTP header

  1. Start TntDrive Dashboard and choose Tools > Default HTTP Headers...

    TntDrive Tools menu with Default HTTP Headers selected
    Choose Tools > Default HTTP Headers.
  2. The Default HTTP Headers dialog will open.

    Default HTTP Headers dialog with matching rules
    Default HTTP Headers dialog with matching rules.
  3. Click Add. The Add New Default HTTP Header dialog will open.

    Add New Default HTTP Header dialog
    Add New Default HTTP Header dialog.
  4. Fill in the fields:

    • Bucket name or mask - identifies the buckets to which the rule applies. Leave it empty to match all buckets.
    • Remote file name or mask - identifies matching Amazon S3 object keys, including any folder prefix. Examples: docs/*, *.xls, or reports/?.csv. Leave it empty to match all files.
    • Header name - specifies the HTTP header to apply. User-defined metadata names must begin with x-amz-meta-.
    • Header value - specifies the value assigned to the header.
    • Enabled - controls whether the rule is currently applied. Clear this checkbox to keep a rule without applying it.
  5. Click Add, then click Save changes.

To set Content-Type for PDF files in the my-files folder of the my-stuff bucket, use:

  • Bucket name or mask: my-stuff
  • Remote file name or mask: my-files/*.pdf
  • Header name: Content-Type
  • Header value: application/pdf

To set Expires for PNG files in the my-images bucket, use:

  • Bucket name or mask: my-images
  • Remote file name or mask: *.png
  • Header name: Expires
  • Header value: select the required future date

Edit, disable, reorder, or delete default HTTP headers

  1. Choose Tools > Default HTTP Headers...

  2. To edit a rule, select it and click Edit, press F2, or double-click the rule.

    Default HTTP Headers dialog with a rule selected for editing
    Select a rule and click Edit.
    Edit Default HTTP Header dialog
    Edit Default HTTP Header dialog.
  3. Use the checkbox in the first column to enable or temporarily disable a rule.

  4. To change rule priority, right-click the selected rule and choose Move selected header(s) up or Move selected header(s) down. You can also press Ctrl+Up or Ctrl+Down.

    Default HTTP Headers context menu with rule ordering commands
    Use the context menu to reorder rules and access keyboard shortcuts.
  5. To delete rules, select one or more rules and click Delete or press Delete.

    Default HTTP Headers dialog with multiple rules selected for deletion
    Select one or more rules and click Delete.
  6. Click Save changes.

Fully Functional Free Trial
Powered by Amazon Web Services
Social Connection
 
People like TntDrive!
People like us
Related Products
TntDrive is developed by Netsdk Software FZE and is not affiliated with, endorsed by, or sponsored by Amazon or AWS. Amazon S3 and Amazon S3 Glacier are trademarks of Amazon.com, Inc. or its affiliates.
Copyright © 2008-2026 Netsdk Software FZE. All rights reserved.  Terms of Use.  Privacy Policy.  CS Browser.  Prevent RDP Brute-Force.