5.14.4

Options S3

If you are using the S3 uploader, all of Fine Uploader's options are still present, and most of them still function the same way. However, some of the options are slightly different. This page will list any new or different options for the S3 uploader. Any option not listed here can be assumed to have the same behavior as the traditional endpoint uploader.

Core

credentials

accessKey

Temporary public AWS key

Type:
String
Default Value:
null

expiration

Expiration date for temporary credentials. May be an ISO 8601 String or a Date object.

Type:
String or Date
Default Value:
null

secretKey

Temporary secret AWS key

Type:
String
Default Value:
null

sessionToken

Session token associated with the temporary credentials.

Type:
String
Default Value:
null

Note

The chunking.paramNames option does not apply to S3.

chunking

partSize

The maximum size of each part, in bytes.

Type:
Integer
Default Value:
5242880

cors

allowXdr

Enables or disables cross-domain ajax calls (if the expected property is true) in IE9 and older.

Type:
Boolean
Default Value:
true

iframeSupport

localBlankPagePath

This is required if you plan on supporting browsers that do not implement the File API, such as IE9 and older. This must point to a blank page on the same origin/domain as the page hosting Fine Uploader.

Type:
String
Default Value:
null

objectProperties

acl

This value corresponds to a canned ACL

Type:
String
Default Value:
private

bucket

Describes the name of the bucket used to house the file in S3. This is required if the bucket cannot be determined by examining the endpoint (such as if you are using a CDN as an endpoint). Possible values are a string representing the bucket name, or a function. If the value is a function, Fine Uploader S3 will pass the associated file ID as a parameter when invoking your function. If the value is a function it may return a promise or a String.

Type:
String or Function
Default Value:
(assumes the bucket can be determined by parsing the endpoint string)

host

The hostname of your S3 bucket. This is required if you are using version 4 signatures and sending files through a CDN. Possible values are a string representing the host name, or a function. If the value is a function, Fine Uploader S3 will pass the associated file ID as a parameter when invoking your function. If the value is a function it may return a promise or a String.

Type:
String or Function
Default Value:
(uses the request endpoint to determine the hostname)

key

Describes the object key used to identify the file in your S3 bucket. Possible values are 'uuid', 'filename' or a function. If the value is a function, Fine Uploader S3 will pass the associated file ID as a parameter when invoking your function. If the value is a function it may return one of a promise or a String.

Type:
String or Function
Default Value:
uuid

reducedRedundancy

Set this to true if you would like to use the reduced redundancy storage class for all objects uploaded to S3.

Type:
Boolean
Default Value:
false

region

Version 4 signatures only: The S3 region identifier for the target bucket.

Type:
String
Default Value:
us-east-1

serverSideEncryption

Set this to true if you would like all uploaded files to be encrypted by AWS.

Type:
Boolean
Default Value:
false

Note

The resume.paramNames option does not apply to S3.

Note

The request.customHeaders option does not apply to S3.

request

accessKey

Your AWS public key. NOT YOUR SECRET KEY. Ignored if credentials have been set.

Type:
String
Default Value:
null

clockDrift

Number of milliseconds to add to the x-amz-date header and the policy expiration date to account for clock drift on the browser/client machine.

Type:
Long
Default Value:
0

endpoint

URL for your S3 bucket or the URL of a CDN that forwards the request to S3. All valid bucket URLs documented by Amazon are supported, including custom domains. SSL is also supported. If you use a CDN address, be sure to specify the bucket via the objectProperties.bucket option.

Type:
String
Default Value:
null

filenameParam

Part of the parameter name that contains the name of the associated file which may differ from the key name. Prefixed with 'x-amz-meta-' by Fine Uploader.

Type:
String
Default Value:
qqfilename

params

Parameters passed along with each upload request.

Type:
Object
Default Value:
{}

signature

customHeaders

Additional headers sent along with each signature request. If you declare a function as the value, the associated file's ID will be passed to your function when it is invoked.

Type:
Object or Function
Default Value:
{}

endpoint

The endpoint that Fine Uploader can use to send policy documents (HTML form uploads) or other strings to sign (REST requests) before sending requests off to S3.

Type:
String
Default Value:
null

version

The AWS/S3 signature version to use. Currently supported values are 2 and 4. Directly related to objectProperties.region.

Type:
Integer
Default Value:
2

uploadSuccess

customHeaders

Additional headers sent along with each signature request.

Type:
Object
Default Value:
{}

endpoint

An endpoint that Fine Uploader should POST to when a file has been successfully uploaded to S3.

Type:
String
Default Value:
null

method

The request method (i.e. POST/PUT).

Type:
String
Default Value:
POST

params

Any additional parameters to attach to upload success file requests. Note that Fine Uploader will still send the bucket, key, filename, UUID, and etag (if available) as well

Type:
Object
Default Value:
{}

UI

failedUploadTextDisplay

mode

You will most likely want to keep this at the default value of 'custom'. See the UI options documentation for more info on this option.

Type:
String
Default Value:
custom