File Upload Question Schema Properties
A file upload question that supports single or multiple file attachments.
Element type: file
Key properties: 16
Generation Hints
Section titled “Generation Hints”- Aliases: upload, attachment, document upload, image upload.
- Use when: respondents upload one or more files.
- Recommended properties:
type,name,title,acceptedTypes,allowMultiple,maxSize,isRequired.
{ "type": "file", "name": "resume", "title": "Upload your resume", "acceptedTypes": ".pdf,.doc,.docx", "allowMultiple": false }Key Properties
Section titled “Key Properties”acceptedTypes
Section titled “acceptedTypes”- Type:
string - Default:
—
An accept attribute value for the underlying element.
acceptedCategories
Section titled “acceptedCategories”- Type:
set - Default:
— - Allowed values:
image,video,audio,document,archive,custom
An array of predefined file category names used to control which files users can upload.
allowMultiple
Section titled “allowMultiple”- Type:
boolean - Default:
—
Specifies whether users can upload multiple files.
maxFiles
Section titled “maxFiles”- Type:
number - Default:
1000
Maximum number of files a user can upload. Applies only if allowMultiple is true.
maxSize
Section titled “maxSize”- Type:
number - Default:
0
Maximum allowed file size, measured in bytes.
sourceType
Section titled “sourceType”- Type:
string - Default:
"file" - Allowed values:
file,camera,file-camera
Specifies the source of uploaded files.
allowImagesPreview
Section titled “allowImagesPreview”- Type:
boolean - Default:
true
Specifies whether to show a preview of image files.
allowImageMarkup
Section titled “allowImageMarkup”- Type:
boolean - Default:
true
Specifies whether respondents can mark up image uploads before submitting them. When enabled, image files open a markup editor with pen, text, rectangle, circle, arrow, color, thickness, zoom, undo, redo, move, resize, and delete controls before upload.
imageHeight
Section titled “imageHeight”- Type:
string - Default:
—
The height of the following images:
imageWidth
Section titled “imageWidth”- Type:
string - Default:
—
The width of the following images:
filePlaceholder
Section titled “filePlaceholder”- Type:
text - Default:
— - Localizable: Yes
A placeholder text displayed when the File Upload question doesn’t contain any files to upload. Applies only when the sourceType value is “file”.
photoPlaceholder
Section titled “photoPlaceholder”- Type:
text - Default:
— - Localizable: Yes
A placeholder text displayed when the File Upload question doesn’t contain any photos to upload. Applies only when the sourceType value is “camera”.
fileOrPhotoPlaceholder
Section titled “fileOrPhotoPlaceholder”- Type:
text - Default:
— - Localizable: Yes
A placeholder text displayed when the File Upload question doesn’t contain any files or photos to upload. Applies only when sourceType value is “file-camera”.
needConfirmRemoveFile
Section titled “needConfirmRemoveFile”- Type:
boolean - Default:
—
Specifies whether users should confirm file deletion.
storeDataAsText
Section titled “storeDataAsText”- Type:
boolean - Default:
true
Specifies whether to store file or signature content as text in SurveyModel’s data property.
waitForUpload
Section titled “waitForUpload”- Type:
boolean - Default:
false
Enable this property if you want to wait until files are uploaded to complete the survey.
Shared Properties
Section titled “Shared Properties”This page lists only properties that are specific to this element type or especially important for generation.
- Use Shared Question Properties for common fields such as
name,title,description,isRequired,requiredIf,visibleIf,enableIf,readOnly,defaultValue,validators,width, and layout options.