HCP Tenant Management Help


Form fields (POST object upload)

The content of a POST object upload request contains a form with fields that are passed to HCP as the contents of a Content-Disposition header. The table below describes the fields you can use in a POST object upload.

Form field Description Required

AWSAccessKeyId

(AWS Signature Version 2 authentication only field)

Specifies the owner of the bucket who grants an anonymous user access for a request that satisfies the constraints in the policy.

A Base64-encoded username for a user account.

For more information see Authentication.

Yes, if policy is sent with request

Signature

(AWS Signature Version 2 authentication only field)

Specifies a value calculated using the secret key and the policy string, as "string to sign."

For more information see Authentication.

Yes, if policy is sent with request
acl

Adds a canned ACL to the resulting object when the upload is completed. The default is private.

For valid values for this field, see Canned ACLs.

No
Content-Encoding,
Expires

REST-specific headers. You can use the values in a policy; they are otherwise treated as follows:

Content-Encoding: If value is gzip and file is gzipped, HCP decodes the file.

Expires: If present, HCP returns the value in the response header.

No
file

Contains file or text content. Can be used with a File or a Textarea form element.

HCP ignores any fields that appear after this field.

You can only upload one file at a time.

Yes
key

Specifies the name of the uploaded key.

To use the file name provided by the user, use the variable ${filename}. For example, if the user Greta uploads the file new_hq.jpg and you specify /user/greta/${filename}, the key name is /user/greta/new_hq.jpg.

Yes
policy

Specifies a security policy describing what is permitted in the request. Requests without a security policy are considered anonymous and work only on publicly writable buckets.

For more information see Security policies.

Yes, if bucket is not publicly writable
success_action_  redirect,
redirect

Specifies a URL to which the client is redirected upon successful upload.

If not specified, HCP returns the empty document type specified in the field success_action_status.

If HCP cannot interpret the URL, it acts as if the field is not present.

If the upload fails, HCP displays an error and does not redirect the user to a URL.

Note: The field redirect is deprecated.

No
success_action_status

If you don't specify success_action_redirect, this status code is returned to the client when the upload succeeds.

Accepts the values 200, 201, or 204(the default).

If set to 200 or 204, HCP returns an empty document with a 200 or 204 status code.

If set to 201, HCP returns an XML document with a 201 status code.

If not set or set to an invalid value, HCP returns an empty document with a 204 status code.

Note: Some versions of Adobe Flash Player do not properly handle HTTP responses with an empty body. To support uploads through Adobe Flash, set to 201.

No
x-amz-meta-*

Adds customer metadata, stored as key-value pairs, to the resulting object when the upload is completed.

No

x-amz-algorithm

(AWS Signature Version 4 authentication only field)

Specifies the signing algorithm that must be used during signature calculation. The value is AWS4-HMAC-SHA256. Yes, if policy is sent with request

x-amz-date

(AWS Signature Version 4 authentication only field)

For more information see Common request headers. Yes, if policy is sent with request

x-amz-signature

(AWS Signature Version 4 authentication only field)

Specifies a value calculated using the secret key and specific elements of the request, including the policy string, as "string to sign."

For more information see Authentication.

Yes, if policy is sent with request

x-amz-credential

(AWS Signature Version 4 authentication only field)

Specifies the credentials that you used to calculate the signature. It provides access key ID and scope information identifying the region and service for which the signature is valid. This should be the same scope you used to calculate the signing key.

Use this format:

access-key-id/date/aws-region/aws-service/aws4_request

For example:

AKIAIOSFODNN7EXAMPLE/20191024/us-east-1/s3/aws4_request

For Amazon S3, the aws-service string is s3.

Yes, if using V4 authentication and policy is sent with request
x-hcp-retention Specifies the retention value for the object being stored. This value can be a fixed date, an offset, a retention class, or a special value No
x-hcp-retentionhold Specifies whether the object is on hold. This value can be either true or false. No

© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.