log(String message)
- Outputs a message to the javascript console, if possible.setParams(Object newParams, [optional] Number id)
- Set the parameters sent along with the request after initializing the uploader. You can either change the parameters for a specific file orBlob
, or for all files andBlob
s. To do the latter, simply omit theid
parameter. See this blog post explaining parameters as well as this one explaining how this function works in 3.1 and later versions.setEndpoint(String endpointPath, [optional] Number id)
- Modify the location, after initializing the uploader, where upload requests should be directed. You can either change the endpoint for a specific file orBlob
, or for all files andBlob
s. To do the latter, simply omit theid
parameter.uploadStoredFiles()
- If!autoUpload
, this will begin uploading all queued files andBlob
s.clearStoredFiles()
- Clears the internal list of stored files andBlob
s. Only applicable whenautoUpload
is set to false.getInProgress()
- Returns the number of files orBlob
s that are either currently uploading or waiting in line to be uploaded.getNetUploads()
- Returns the number of files orBlob
s that have both been successfully uploaded and have NOT been deleted.retry(String id)
- Orders the uploader to make another attempt at uploading a specific file orBlob
. A NO-OP if the server prohibits retries on a failed file via thepreventRetryResponseProperty
. Note that this operation does respect themaxConnections
value, so if all connections are accounted for, the retry attempt will be queued until a connection opens up.cancel(String id)
- Cancels a queued or currently uploading file orBlob
.cancelAll()
- Cancels all queued or currently uploading files orBlob
s.reset()
- While this function is most useful for FineUploader, it is also available in FineUploaderBasic. In FineUploader, calling this function will reset all UI elements to the state they exsited in immediately after initialization. In FineUploaderBasic, this resets all internal variables to the state they existed in immediately after initialization. If you are using FineUploaderBasic, it is up to you to "reset" any of your UI elements.addFiles(filesOrInputs, (optional) params, (optional) endpoint)
- Use this if you would like to submit files to the uploader. This may be useful if you have a method of gathering files that does not include Fine Uploader's input button or the drag & drop support built into FineUploader. This function accepts the following types:File
,input
element, or a collection of any of these types, provided the collection object contains an (integer) index property for each contained item. Note that you can also pass parameters and/or an endpoint to associate with the passed file(s) or input(s).addBlobs(blobDataArray, (optional) params, (optional) endpoint)
- Allows you to submit one or moreBlob
objects to be uploaded. This is expected to be an array ofBlobData
objects. ABlobData
object is simply defined by the following convention: an object with aname
property (used to assoicate a name with theBlob
) and ablob
property (with a value equal to theBlob
you would like to upload). Note that you may also simply pass oneBlob
or an array ofBlob
objects. In each of these last two cases, a default name, defined in theblobs
option, will be used. Also note that yourBlob
objects must beBlob
objects, but notFile
objects. In other words,Blob
subtypes are not acceptable. If you would like to uploadFile
objects via the API, do so via theaddFiles
function. Note that you can also pass parameters and/or an endpoint to associate with the passedBlob
object(s).getResumableFilesData()
- Returns an array of objects, each describing a file that is potentially resumable by this uploader instance. If aresume.id
property has been set, this is taken into consideration. Each resumable file is represented by an object with the following properties:name
- filename,size
- file size,uuid
- unique ID associated w/ the file,partIdx
- index of the part where the resume will start.getSize(id)
- Returns the size of theFile
orBlob
represented by the passed ID. Undefined if the file size cannot be determined, such as if the user agent does not support the File API.getName(id)
- Returns the name of the file orBlob
represented by the passed ID.getFile(id)
- Returns theFile
orBlob
object associated with the passed ID. Undefined if the underlyingFile
orBlob
cannot be found, or if the user agent does not support the File API. For more info on theFile
andBlob
objects, please see the File entry in the W3C spec and the Blob entry in the W3C spec, respectively.deleteFile(id)
- This allows you to programmatically order Fine Uploader to send a DELETE request for a specific file orBlob
. Fine Uploader actually uses the API call internally when a user clicks the delete link in FineUploader mode.setDeleteFileEndpoint(String endpointPath, [optional] Number id)
- Same as thesetEndpoint
function except this applies only to thedeleteFile
option endpoint(s).getUuid(id)
- Retrieves the UUID associated with a file orBlob
, given a current session file orBlob
ID.