Skip to content

Latest commit

 

History

History
executable file
·
288 lines (280 loc) · 9.85 KB

options-fineuploader.md

File metadata and controls

executable file
·
288 lines (280 loc) · 9.85 KB

FineUploader mode options

Note that all FineUploaderBasic mode options are also available in FineUploader mode.


Name Type Default Note
element element null Container for the default drop zone (if supported by browser) and files/`Blob` objects list. Required
listElement element null Container for the file or `Blob` list. If null, the list defined in the template will be used.

dragAndDrop option properties:

Name Type Default Note
extraDropzones array of elements [] Useful if you'd like to to designate additional dropozones for file input. Of course, this is not relevant if the form uploader is used.
hideDropzones boolean true Useful if you do not want all dropzone elements to be hidden. It is expected that some CSS would accompany setting this option to false. You may set this to false if you want to wrap some visible elements, such as the listElement, in a drop zone.
disableDefaultDropzone boolean false Set this to true if you are contributing your own drop zone(s) and do not want to use the default one.

text option properties:

Name Type Default Note
uploadButton string Upload a file Label for the file selector button
cancelButton string cancel The cancel button text (which is more of a link than a button).
retry string Retry The retry (a failed upload) link text.
failUpload string Upload failed Text that appears next to a failed file or `Blob` item
dragZone string Drop files here to upload Text that appears in the drop zone when it is visible
dropProcessing string Processing dropped files... Text that appears next to the drop processing spinner while we are waiting for the upload to finish processing dropped files or directories.
formatProgress string {percent}% of {total_size} Text that appears next to a file or `Blob` as it is uploading (if the browser supports the file API)
waitingForResponse string Processing... Text that appears next to a file or `Blob` after last byte has been sent (according to the UA) while we are wating for a response from the server.

failedUploadTextDisplay option properties:

Name Type Default Note
mode string default Valid values are "default" (display the text defined in failUploadText next to each failed file), "none" (don't display any text next to a failed file), and "custom" (display error response text from the server next to the failed file or `Blob`).
maxChars integer 50 The maximum amount of character of text to display next to the file or `Blob`. After the limit has been reached, "..." will terminate the string. This is ignored unless mode is "custom".
responseProperty string error The property from the server response containing the error text to display next to the failed file or `Blob`. This is ignored unless mode is "custom".
enableTooltip boolean true If set to true, a tooltip will display the full contents of the error message when the mouse pointer hovers over the failed file or `Blob`. Note that this currently uses the title attribute of the failed item element.

messages option properties:

Name Type Default Note
tooManyFilesError string You may only drop one file Text sent to `showMessage` and the `onError` callback when `multiple` is `false` and more the one file is dropped at once.

retry option properties:

Name Type Default Note
showAutoRetryNote boolean true If set to true, a status message will appear next to the file or `Blob` during automatic retry attempts.
autoRetryNote string Retrying {retryNum}/{maxAuto}... The text of the note that will optionally appear next to the file or `Blob` during automatic retry attempts. Ignored if showAutoRetryNote is false.
showButton boolean false If true, a button/link will appear next to a failed file or `Blob` after all retry attempts have been exhausted, assuming the server has not prohibited further retry attempts via the preventRetryResponseProperty. This button/link will allow the user to manually order the uploader to make another attempt at uploading the failed file or `Blob`. Note that this operation does respect the maxConnections value, so if all connections are accounted for, the retry attempt will be queued until a connection opens up.

deleteFile option properties:

For more information on the Delete File feature, please read the associated blog post and check out the server-side readme.

Name Type Default Note
forceConfirm boolean false Set this to true if you want to force users to confirm their choice to delete a file. This uses the showConfirm function, which is overridable.
confirmMessage string Are you sure you want to delete {filename}? The message displayed in the confirm delete dialog (if enabled). Note that the {filename} string is important, as Fine Uploader replaces this with the associated file name in the confirm dialog.
deletingStatusText string Deleting... Status message to appear next to a file that is pending deletion. Note that a spinner, by default, will also appear.
deletingFailedText string Delete failed Status message to appear next to a file that has failed to delete.

display option properties:

Name Type Default Note
fileSizeOnSubmit boolean false If set to true, the file or `Blob` size (if available) will be displayed next to the file immediately after the file has been submitted/selected. Otherwise, it will only appear once the actual upload starts.