Question T8099
Visible to All Users

SurveyJS service

created 3 years ago

Hi! I was trying out your services and I created a survey with a field for a file upload.
However I notice that the answers to the survey are only recorded when I leave the file upload field empty.
Why does this happen? Do I need to write some extra code to submit the file separately?

The code to the survey I made is below:

JavaScript
Survey.StylesManager.applyTheme("modern"); var surveyJSON = {title:"Unlock your potential",description:"Send us an image and/or textual prompt you want to expand into an artwork. You will be redirected to a page to complete your purchase after submitting the form.",pages:[{name:"page1",elements:[{type:"text",name:"question2",title:"Your name or alias"},{type:"text",name:"question1",title:"Your email",inputType:"email"},{type:"file",name:"image_prompt",title:"Upload an image prompt",description:"Minimum size 500x500 pixels"},{type:"text",name:"question3",title:"Write a textual prompt",description:"Maximum 200 characters",maxLength:200}]}],showCompletedPage:false,navigateToUrl:"https://www.connectomeart.com/unlock/p/digital-painting"} function sendDataToServer(survey) { survey.sendResult('14006b21-fad1-413c-a99e-6ba903998030'); } var survey = new Survey.Model(surveyJSON); $("#surveyContainer").Survey({ model: survey, onComplete: sendDataToServer });

Answers approved by surveyjs Support

created 3 years ago (modified 3 years ago)

Hello,

Our service http://surveyjs.io doesn't provide file upload functionality. Thus you can't post survey result more then 64k to our service.

Thanks, Serge
SurveyJS Team

    Comments (1)

      Ahh I see! Thank you for the clarification.