File_FileUploader Widget

The File_FileUploader widget adds a configurable file-upload control to a page. It supports file-type and size restrictions, optional multiple-file selection, labels, and an optional drag-and-drop area.

File uploader shown with a select-file control and drag-and-drop area

Add the widget to a page

<Control src="LoadWidgetControl.ascx"
    FileLocation="File_FileUploader.html"
    Options="allowMultipleFiles: false,
        allowedExtensionsForUpload: '.pdf',
        maxFileSize: 4500000,
        uploadMode: 'useButton'" />

Choose the smallest file-type and size allowance that supports the page workflow. Do not rely on client-side restrictions as the only protection for uploaded files.

Widget options

Option Default Valid values or format Effect
allowMultipleFiles
Boolean
Not specified true, false Allows a shopper to select one or multiple files.
allowedExtensionsForUpload
String
Not specified File-extension list Sets the permitted file extensions.
maxFileSize
Number
Not specified File size Sets the maximum upload size.
displayRules
Boolean
Not specified true, false Shows or hides the allowed extensions and maximum size.
label
String
Not specified Text Sets the uploader label.
allowDragAndDropZone
Boolean
Not specified true, false Shows or hides a drag-and-drop upload area.
strObscureFilename
Boolean
Not specified true, false Saves uploaded files with randomly generated names.
filePrefix
String
Not specified Text Adds a prefix to the saved file name.
fileSuffix
String
Not specified Text Adds a suffix to the saved file name.
uploadMode
String
Not specified 'instantly', 'useButton' Controls when the upload starts.

Validate file uploads

  1. Upload an allowed test file that is smaller than the configured size limit.
  2. Attempt an unsupported file type and an oversized file; confirm both are rejected.
  3. Test the configured multiple-file and drag-and-drop behavior.
  4. Confirm uploaded files are available only to authorized users of the page workflow.

This site uses Just the Docs, a documentation theme for Jekyll.