How to set Metadata Content-Type for Aspera transfers on S3

Overview

This article is for customers who would like to enable Metadata Content Type for Aspera transfers on S3 in the following Aspera on Demand products:  APOD, SHOD and FOD.

If you don't know how to enable AoD to use S3 for storage, please see this artilce.  If you are still investigating Aspera on Demand options and want to learn more, please view the Aspera Cloud site for more info.

Prerequisites

 This article assumes the following:

  • You have Enterprise Server v.3.4.0.78688 or higher
  • You purchased and booted up v.3.x Aspera on Demand products:  APOD, SHOD and FOD
  • You have created an S3 bucket
  • You know your S3 Access ID and Secret Key
  • You know how to SSH as root to your Aspera On Demand Instance

Procedure

Enabling the default Metadata Content Type for Aspera transfers

(1) Connect to your AMI host from a Terminal/Command Prompt via SSH as root

# ssh -i [customer's pem] -p 33001 [ec2-user]@[ec2 host IP]
# sudo su -
NOTE: make sure the permission of the key is set to 400.

(2) Enabling mime-types mapping

a. If you have ES 3.6 or greater

# vim /opt/aspera/etc/trapd/trap.properties

Find the #aspera.mime-types.enabled=false line. Uncomment the line and change the value to true. Save the file and restart trapd.

aspera.mime-types.enabled=true
# service asperatrapd restart

b. If you have an ES version prior to 3.6

# vim /opt/aspera/etc/init.d/asperatrapd_init.sh

Find JVM_OPTIONS="$PROPS" and insert the following line above it. Save the file and restart trapd.

PROPS="$PROPS -Daspera.mime-types.enabled=true"
# service asperatrapd restart

(3) Verify Metadata Content Type in AWS Console

Log onto your AWS Console, navigate to S3 Management Console and check the Properties of the files you uploaded to your S3 bucket via Aspera. Under Metadata, you should see Content Type is set to "text/plain" after you uploaded a file with a .txt extension.

content_type.jpg

Enablingyour custom Metadata Content Type for Aspera transfers

(1) Connect to your AMI host from a Terminal/Command Prompt via SSH as root

# ssh -i [customer's pem] -p 33001 [ec2-user]@[ec2 host IP]
# sudo su -
NOTE: make sure the permission of the key is set to 400.

(2) Create a mimes-types.props file that contains your custom content type under /opt/aspera/etc/trapd

The syntax of the mimes-types.props file should be one pair extension mime-type per line. For example:

syntax.jpg

(3) Enabling mime-types mapping

a. If you have ES 3.6 or greater

# vim /opt/aspera/etc/trapd/trap.properties

Find the #aspera.mime-types.enabled=false line. Uncomment the line and change the value to true.

aspera.mime-types.enabled=true

Then look for the line #aspera.mime-types.file=mimes-types.props. Uncomment the line. Save the file and restart trapd.

aspera.mime-types.file=mimes-types.props
# service asperatrapd restart

b. If you have an ES version prior to 3.6

# vim /opt/aspera/etc/init.d/asperatrapd_init.sh

Insert the following lines at the end of the  trap_init_start() section, save the file and restart trapd.

PROPS="$PROPS -Daspera.mime-types.enabled=true"
PROPS="$PROPS -Daspera.mime-types.file=mimes-types.props"
# service asperatrapd restart

(4) Verify Metadata Content Type in AWS Console

Log onto your AWS Console, navigate to S3 Management Console and check the Properties of the files you uploaded to your S3 bucket via Aspera. Under Metadata, you should see your custom Content Type after you uploaded a file with a custom extension. In this example, .bmp extension.

custom_type.jpg

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk