Skip to main content

i4w_s3link

Usage

This shortcode is designed to generate an Amazon S3 self-expiring link, based on information provided in the "Amazon S3 Links" option panel or override parameters in the shortcode itself.

[ELSE_s3link] conditional branching is NOT supported.

Shortcode nesting is NOT supported.

Parameters

ParameterDescriptionDefaultRequired
s3keyYour S3 Key, to override anything entered in the settings panel.See options panelNo
s3secretYour S3 Secret, to override anything entered in the settings panel.See options panelNo
protocolThe protocol to be used in building the URL, either 'http' or 'https'. Use this parameter when creating download links. Leave it out when building link for video and audio players.httpsNo
hostThe Amazon host name where your file is located, if you want to override the information provided in the 'Amazon S3 Links" options panel. In 99.99% of the cases, it will always be s3.amazonaws.comSee options panelNo
bucketThe name of the bucket where the file is stored, if other than the one specified in the options panel. The bucket name should not include any path information.See options panelNo
objectThe file name for which a self-expiring link should be generated. If the file is located in a folder, specify the file path relative to the bucket.NoneYes
expireSpecifies the number of seconds after which the generated link loses validity.See options panelNo

Example

Shortcode
[i4w_s3link object='folder/file']
Shortcode
[i4w_s3link protocol='https' bucket='bucketname' object='folder/file']
Shortcode
[i4w_s3link s3key='myS3key' s3secret='myS3secret' bucket='bucketname' object='folder/file']
Shortcode
[i4w_s3link protocol='https' host='s3.amazonaws.com' object='folder/file' expire='240']
Shortcode
<a href="[i4w_s3link protocol='https' object='folder/file']">Your anchor text</a>

Notes

warning

This shortcode generates a link with a number of S3-specific parameters. Some video player plugins are not able to handle these types of links.

Please note that we cannot provide support for those plugins and shortcodes.