Ajax File upload

  <cffileupload url="">


The cffileupload tag is DEPRECATED as of ColdFusion 2016

Attribute Reference

url string

The URL to the server where the files are uploaded.

width string

Width of the file upload control, in pixels.

title string

Title for the upload dialog.

extensionfilter string

Use this attribute to specify the type of file that you will allow to be uploaded.
For example, to let only image files to be uploaded, you can specify file extensions like .jpg, .jpeg, or .png

uploadbuttonlabel string

Label of the Upload button.

progressbar boolean

Whether to display Progress Bar or not. Default true
  • true
  • false

height string

Height of the file upload control, in pixels.

maxUploadSize numeric

The maximum file size, in megabytes, allowed for the upload. Default 10MB.

maxFileSelect string

The maximum number of files allowed for the upload.

style string

A CSS style specification that defines layout styles

bgcolor string

The background color for the file upload control. A hexadecimal value without "#" prefixed.

addButtonLabel string

Label of the Add button

name string

Name of the file upload component.

oncomplete string

The JavaScript function to run after the file upload completes

onerror string

The JavaScript function to run on an error condition. The error can be a network error or server-side error

clearButtonLabel string

Label of the Clear button

deleteButtonLabel string

Label of the Delete button

align string

Specifies the default alignment
  • left
  • right
  • center
  • justify

wmode string

Specifies the absolute positioning and layering capabilities in your browser:
  • opaque
  • transparent
  • window

stopOnError boolean

Specifies whether or not to ignore the exceptions for this operation. When the value is
true, it stops uploading, displays an appropriate error
  • true
  • false

hideUploadButton boolean

A Boolean value that specifies if the Upload button should appear in the media player
  • true
  • false

onUploadComplete string

The JavaScript function to run after the all uploads have completed



DEPRECATED since version 2016

Sample code using the cffileupload tag

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub