Question T18496
Visible to All Users

How to configure SurveyJS to preview the document before submission

created a year ago

Hi SurveyJS Team,

We have a lot of forms which capture a lot of documents via File Upload option along with other questions. We have configured the forms to show preview before submitting.
Right now in preview mode, it download the document and then user need to open the file from downloads and preview it. This leads to two main problems:

  1. Experience of previewing seems to be broken as user need to leave our webportal, go to their downloads and open the document in their native app
  2. It creates duplicate document of each document that they want to preview (as it downloads the document)

Is there an option or workaround where we can have a preview of the document within browser directly without downloading on device? So that for user it is a seamless experience of previewing the documents and information within our portal without creating duplicates?

Regards,
Animesh

Answers approved by surveyjs Support

created a year ago

Hello Animesh,
File Upload displays preview for image files out of the box. If you wish to additionally display a preview of other document types, consider implementing a custom file preview and rendering file previews within a custom component. For more information, please visit the following demo: Custom Previews for File Upload Questions.

Please let us know if you have further questions.

    Comments (3)
    A A
    Ajuria - Forms Creation a year ago

      Hi Jane,

      Currently in preview stage it only shows the document name in preview. And on clicking it, it downloads the file. What we were looking for is an in-app preview instead of download.

      Attached is the reference recording of how it is working right now.

      Regards

        Hello,
        Thank you for the clarification. Unfortunately, File Upload doesn't offer a built-in option to render preview for PDF or other file types. You can implement a custom preview component and render a PDF file thumbnail/preview to let users quickly review the uploaded file.

        Let me know if you have more questions.

        A A
        Ajuria - Forms Creation a year ago

          Hi Jane,

          Thank you for the confirmation.

          Regards,