4.4.0

Options Core

Fine Uploader has a plethora of options. Many of these options change meaning depending on what sort of uploader you are using. Pay close attention to the mode you are in and keep that in mind when determining which options do what.

Core

autoUpload

Set to false if you want to be able to upload queued items later by calling the uploadStoredFiles() method.

Type:
Boolean
Default Value:
true

button

Specify an element to use as the ‘select files’ button. Cannot be a <button> (#33)

Type:
HTMLElement
Default Value:
null

debug

This will result in log messages being written to the window.console object

Type:
Boolean
Default Value:
false

disableCancelForFormUploads

When true the cancel link does not appear next to files when the form uploader is used.

Type:
Boolean
Default Value:
false

formatFileName

Provide a function to control the display of file names. The default function limits the name displayed in the UI to 33 characters plus 3 ellipses separating the first and last several characters. The unformatted file name is passed into the function when it is invoked.

Type:
Function
Default Value:

maxConnections

Maxmimum allowable concurrent requests

Type:
Integer
Default Value:
3

multiple

When false this will prevent the user from simultaneously selecting or dropping more than one item.

Type:
Boolean
Default Value:
true

blobs

defaultName

The default name to be used for nameless Blobs.

Type:
String
Default Value:
Misc data

camera

button

null means allow camera access on the default button in iOS, otherwise, provide an extra button container element to target.

Type:
HTMLElement
Default Value:
null

ios

Enable or disable camera access on iOS (iPod, iPhone, and iPad) devices. Note: Enabling this will disable multiple file selection.

Type:
Boolean
Default Value:
false

chunking

enabled

Enable or disable splitting the file separate parts. Each part is sent in a separate request.

Type:
Boolean
Default Value:
false

partSize

THe maximum size of each part, in bytes.

Type:
Integer
Default Value:
2000000

paramNames.chunkSize

Name of the parameter passed with a chunked request that specifies the size in bytes of the associated chunk.

Type:
String
Default Value:
qqchunksize

paramNames.partByteOffset

Name of the parameter passed with a chunked request that specifies the starting byte of the associated chunk.

Type:
String
Default Value:
qqpartbyteoffset

paramNames.partIndex

Name of the parameter passed with a chunked request that specifies the index of the associated partition.

Type:
String
Default Value:
qqpartindex

paramNames.totalParts

Name of the parameter passed with a chunked request that specifies the total number of chunks associated with the File or Blob.

Type:
String
Default Value:
qqtotalparts

cors

allowXdr

Enable or disable cross-origin requests from IE9 and older where XDomainRequest must be used.

Type:
Boolean
Default Value:
false

expected

Enable or disable cross-domain requests.

Type:
Boolean
Default Value:
false

sendCredentials

Enable or disable sending credentials along with each cross-domain request. Ignored if allowXdr is true and IE9 is being used.

Type:
Boolean
Default Value:
false

deleteFile

customHeaders

Any additional headers to attach to all delete file requests.

Type:
Object
Default Value:
{}

enabled

Enable or disable deletion of uploaded files.

Type:
Boolean
Default Value:
false

endpoint

The endpoint to which delete file requests are sent.

Type:
String
Default Value:
/server/upload

method

Set the method to use for delete requests. Accepts ‘POST’ or ‘DELETE’

Type:
String
Default Value:
DELETE

params

Any additional parameters to attach to delete file requests.

Type:
Object
Default Value:
{}

extraButtons

This must contain an array of objects. Each object will describe an “extra” button that Fine Uploader will track along with the default upload button. Each button object can contain the following properties:

element

REQUIRED: The container element for the upload button.

Type:
HTMLElement
Default Value:
undefined

folders

true to allow folders to be selected, false to allow files to be selected. See the browser support page for details regarding the limited user agent support for this feature.

Type:
Boolean
Default Value:
false

multiple

Specify to override the default multiple value.

Type:
Boolean
Default Value:
true

validation

Specify to override the default validation option specified. Any validation properties not specified will be inherited from the default validation option.

Type:
Object
Default Value:
`validation`

form

Override default values for form support. See the form support feature page for more details.

element

This can be the ID of the <form> or a reference to the <form> element.

Type:
String or HTMLElement
Default Value:
qq-form

autoUpload

If Fine Uploader is able to attach to a form, this value takes the place of the base autoUpload option.

Type:
Boolean
Default Value:
false

interceptSubmit

Set this to false if you do not want Fine Uploader to intercept attempts to submit your form. By default, Fine Uploader will intercept submit attempts and instead upload all submitted files, including data from your form in each upload request.

Type:
Boolean
Default Value:
true

messages

emptyError

Text passed to the error event handler if a submitted item is zero bits.

Type:
String
Default Value:
{file} is empty, please select files again without it.

maxHeightImageError

Text passed to the error event handler if an image is too tall.

Type:
String
Default Value:
Image is too tall.

maxWidthImageError

Text passed to the error event handler if an image is too wide.

Type:
String
Default Value:
Image is too wide.

minHeightImageError

Text passed to the error event handler if an image is not tall enough.

Type:
String
Default Value:
Image is not tall enough.

minWidthImageError

Text passed to the error event handler if an image is not wide enough.

Type:
String
Default Value:
Image is not wide enough.

minSizeError

Text passed to the error event handler if the item is too small.

Type:
String
Default Value:
{file} is too small, minimum file size is {minSizeLimit}.

noFilesError

Text passed to the error event handler if any empty array of items is submitted.

Type:
String
Default Value:
No files to upload.

onLeave

Text displayed to the user when they attempt to leave the page while uploads are still in progress.

Type:
String
Default Value:
The files are being uploaded, if you leave now the upload will be canceled.

retryFailTooManyItemsError

Text passed to the error event handler if a retry attempt is declared a failed due to a violation of the validation.itemLimit rule.

Type:
String
Default Value:
Retry failed - you have reached your file limit.

sizeError

Text passed to the error event handler if a submitted item is too large.

Type:
String
Default Value:
{file} is too large, maximum file size is {sizeLimit}.

tooManyItemsError

Text passed to the error event handler if a submit is ignored due to a violation of the validation.itemLimit rules.

Type:
String
Default Value:
Too many items ({netItems}) would be uploaded. Item limit is {itemLimit}.

typeError

Text passed to the error event handler if an invalid file type is detected.

Type:
String
Default Value:
{file} has an invalid extension. Valid extension(s): {extensions}.

paste

defaultName

The default name given to pasted images.

Type:
String
Default Value:
pasted_image

targetElement

Enable this feature by providing any HTMLElement here.

Type:
HTMLElement
Default Value:
null

resume

cookiesExpireIn

The number of days before a persistent resume cookie will expire.

Type:
Integer
Default Value:
7

enabled

Enable or disable the ability to resume failed or stopped chunked uploads.

Type:
Boolean
Default Value:
false

id

An additional component of the cookie name used to store the current upload session.

Type:
Integer or String or Boolean
Default Value:
null

paramNames.resuming

Sent with the first request of the resume with a value of true.

Type:
String
Default Value:
qqresume

retry

autoAttemptsDelay

The number of seconds to wait between auto retry attempts.

Type:
Integer
Default Value:
5

enableAuto

Enable or disable retrying uploads that receive any error or non-200 response.

Type:
Boolean
Default Value:
false

maxAutoAttempts

The maximum number of times to attempt to retry a failed upload.

Type:
Integer
Default Value:
3

preventRetryResponseProperty

This property will be looked for in the server response and, if found and true, will indicate that no more retries should be attempted for this item.

Type:
String
Default Value:
preventRetry

request

customHeaders

Additional headers sent along with each upload request.

Type:
Object
Default Value:
{}

endpoint

The endpoint to send upload requests to.

Type:
String
Default Value:
/server/upload

filenameParam

The name of the parameter passed if the original filename has been editied or a Blob is being sent.

Type:
String
Default Value:
qqfilename

forceMultipart

Force all uploads to use multipart encoding

Type:
Boolean
Default Value:
true

inputName

The attribute of the input element which will contain the file name. Not applicable to non AJAX uploads.

Type:
String
Default Value:
qqfile

params

The parameters that shall be sent with each upload request.

Type:
Object
Default Value:
{}

paramsInBody

Enable or disable sending parameters in the request body. If false, parameters are sent in the URL. Otherwise, parameters are sent in the request body.

Type:
Boolean
Default Value:
true

uuidName

The name of the parameter the uniquely identifies each associated item. The value is a Level 4 UUID.

Type:
String
Default Value:
qquuid

totalFileSizeName

The name of the parameter passed that specifies the total file size in bytes.

Type:
String
Default Value:
qqtotalfilesize

scaling

See the Upload Scaled Images feature page for more details.

defaultQuality

A value between 1 and 100 that describes the requested quality of scaled images. Ignored unless the scaled image type target is image/jpeg.

Type:
Integer
Default Value:
80

defaultType

Scaled images will assume this image type if you don’t specify a specific type in your size object, or if the type specified in the size object is not valid. You generally should not use any value other than image/jpeg or image/png here. The default value of null will ensure the scaled image type is PNG, unless the original file is a JPEG, in which case the scaled file will also be a JPEG. The default is probably the safest option.

Type:
String
Default Value:
null

failureText

Text sent to your complete event handler as an error property of the response param if a scaled image could not be generated.

Type:
String
Default Value:
Failed to scale

includeExif

Ensure the EXIF data from the reference image is inserted into the scaled image. Only applicable when both the reference and the target are type image/jpeg.

Type:
Boolean
Default Value:
false

orient

Set this to false if you do not want scaled images to be re-oriented based on parsed EXIF data before they are uploaded.

Type:
Boolean
Default Value:
true

sendOriginal

Set this to false if you don’t want to original file to be uploaded as well.

Type:
Boolean
Default Value:
true

sizes

An array containing size objects that describe scaled versions of each submitted image that should be generated and uploaded. A size object must contain a name String property, a maxSize integer property, and optionally a type MIME string property.

Type:
Array
Default Value:
[]

session

See the Initial File List feature page for more details.

customHeaders

Any additional headers you would like included with the GET request sent to your server. Ignored in IE9 and IE8 if the endpoint is cross-origin.

Type:
Object
Default Value:
{}

endpoint

If non-null, Fine Uploader will send a GET request on startup to this endpoint, expecting a JSON response containing data about the initial file list to populate.

Type:
String
Default Value:
null

params

Any parameters you would like passed with the associated GET request to your server.

Type:
Object
Default Value:
{}

refreshOnRequest

Set this to false if you do not want the file list to be retrieved from the server as part of a reset.

Type:
Boolean
Default Value:
true

text

defaultResponseError

In the event of non-200 response from the server sans the ‘error’ property, this message will be passed to the ‘error’ event handler.

Type:
String
Default Value:
Upload failure reason unknown

sizeSymbols

Symbols used to represent file size, in ascending order.

Type:
Array
Default Value:
['kB', 'MB', 'GB', 'TB', 'PB', 'EB']

validation

acceptFiles

Used by the file selection dialog. Restrict the valid file types that appear in the selection dialog by listing valid content-type specifiers here. See docs on the accept attribute of the <input> element

Type:
Comma-delimited list of valid MIMEtypes
Default Value:
null

allowedExtensions

Specify file valid file extensions here to restrict uploads to specific types.

Type:
Array
Default Value:
[]

itemLimit

Maximum number of items that can be potentially uploaded in this session. Will reject all items that are added or retried after this limit is reached.

Type:
Integer
Default Value:
0

minSizeLimit

The minimum allowable size, in bytes, for an item.

Type:
Integer
Default Value:
0

sizeLimit

The maximum allowable size, in bytes, for an item.

Type:
Integer
Default Value:
0

stopOnFirstInvalidFile

When true the first invalid item will stop processing further files.

Type:
Boolean
Default Value:
true

image.maxHeight

Restrict images to a maximum height in pixels (wherever possible).

Type:
Integer
Default Value:
0

image.maxWidth

Restrict images to a maximum width in pixels (wherever possible).

Type:
Integer
Default Value:
0

image.minHeight

Restrict images to a minimum height in pixels (wherever possible).

Type:
Integer
Default Value:
0

image.minWidth

Restrict images to a minimum width in pixels (wherever possible).

Type:
Integer
Default Value:
0