Delayed File Upload

Edit in →

Delayed file upload is a technique that enables you to postpone file upload until a certain moment. This technique helps save storage space on your server: if a user selects a file and then changes it to another, the first file won't be uploaded. This demo shows how to upload files when a survey is completed. Until that moment, files are stored in a variable as base64-encoded strings. Read more...

Themes
Color palette
Question appearance
Sorry, we can't retrieve the data from server. Please comeback later.

Delayed file upload is a technique that enables you to postpone file upload until a certain moment. This technique helps save storage space on your server: if a user selects a file and then changes it to another, the first file won't be uploaded. This demo shows how to upload files when a survey is completed. Until that moment, files are stored in a variable as base64-encoded strings.

To implement delayed file upload, program different functionalities within the following event handlers:

  • onUploadFiles
    Add files to a variable that acts as a temporary file storage and load file previews.

  • onClearFiles
    Remove all or individual files from the temporary file storage.

  • onComplete
    Upload files to a server and save metadata about them as the question value.

For more information, view code listings for Angular, React, Vue, jQuery, or Knockout.

In this demo, files are uploaded to SurveyJS servers from where they are then deleted after a predefined period of time. We strongly encourage you to use your own servers for file uploads when you use SurveyJS to collect sensitive respondent data in your application.

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.