4.4.0

Methods S3

S3

The S3 uploader provides many of the same API methods as the traditional uploader, but there are a few crucial differences to take into account. If you plan to use the S3 uploader, then use the following table as your API reference. All methods outlined in the core or UI documentation are also available in Fine Uploader S3, unless otherwise noted here.

getKey (fileId)

Retreive the S3 object key with the associated ID

Parameters:
Integer
fileId

An ID corresponding to a file.


Returns:
String
The S3 object key associated with the fileID.

getResumableFilesData ()

Returns an array of potentially resumable items. Each resumable is represented by an object with the following properties:

Property Description
name filename
uuid the unique id
partIdx the index of the part where the resume will start from
key The associated object’s S3 key
Returns:
Array
An array of resumable items.

setAcl (newAcl[, id])

Set/update the ACL to be used for one or all file uploads. If the ID is omitted, the new ACL targets all future files that have not yet been uploaded.

Parameters:
String
newAcl

Canned ACL value to be sent with the upload request. Used by S3.


Integer
id

File ID to target the ACL.


setCredentials (newCredentials)

Pass new or initial credentials. This is used to support the no-server workflow.

Parameters:
Object
newCredentials

The new or initial credentials to set for server-less uploads


setEndpoint (bucketPath[, id])

Modify the bucket where upload requests should be directed. The endpoint for a specific file or blob can be changed by passing in an optional id parameter. An id will always be a number and refers to a single file. All valid bucket URLs documented by Amazon are supported, including custom domains. SSL is also supported.

Parameters:
String
bucketPath

The new S3 bucket path


Integer
id

An ID corresponding to a file.


setUploadSuccessParams (newParams[, id])

Set additional parameters for the upload success request. Note that Fine Uploader will still send the bucket name, key, filename, UUID, and etag (if available) as well.

Parameters:
Object
newParams

The additional parameters set for the upload request.


Integer
id

A file id to apply these upload success parameters to.