Documentation Docs
Documentation Docs

QuestionFileModel

A class that describes the File Upload question type.

View Demo

acceptedTypes property

An accept attribute value for the underlying <input> element.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel

Specifies whether to show a preview of image files.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
QuestionFileModel
allowMultiple property

Specifies whether users can upload multiple files.

Default value: false

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel

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".

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel
See also:
filePlaceholder * , photoPlaceholder
filePlaceholder property

A placeholder text displayed when the File Upload question doesn't contain any files to upload. Applies only when the sourceType value is "file".

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel
See also:
photoPlaceholder * , fileOrPhotoPlaceholder
imageHeight property

The image height.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel
imageWidth property

The image width.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel
loadFiles method

Loads multiple files into the question.

Type:
(files: any[]) => void
Parameters:
files, type: any[] ,

An array of File objects.

Implemented in:
QuestionFileModel
maxSize property

Maximum allowed file size, measured in bytes.

Default value: 0 (unlimited)

Type:
number writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel

Specifies whether users should confirm file deletion.

Default value: false

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel
photoPlaceholder property

A placeholder text displayed when the File Upload question doesn't contain any photos to upload. Applies only when the sourceType value is "camera".

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionFileModel
See also:
filePlaceholder * , fileOrPhotoPlaceholder
removeFile method

Removes a file with a specified name.

Type:
(name: string) => void
Parameters:
name, type: string
Implemented in:
QuestionFileModel
showPreview property

Disable this property only to implement a custom preview.

View Demo

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
QuestionFileModel
See also:
allowImagesPreview
sourceType property

Specifies the source of uploaded files.

Possible values:

  • "file" (default) - Allows respondents to select a local file.
  • "camera" - Allows respondents to capture and upload a photo.
  • "file-camera" - Allows respondents to select a local file or capture a photo.
Type:
string readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
file
Accepted values:
file , camera , file-camera
Implemented in:
QuestionFileModel
See also:
filePlaceholder * , photoPlaceholder * , fileOrPhotoPlaceholder

Copyright © 2023 Devsoft Baltic OÜ. All rights reserved.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.