Feature request: File upload
jimbrew opened this issue · comments
Do you have any plans to support uploading files.
Thank you.
Hi @jimbrew,
we do, it's actually currently in development and should be ready shortly. I'm not sure when we'll build a new npm version, but it will be available in the GitHub version.
This has now been merged to the master branch, the type is QuestionType.File
, it's used in the same way as the other question types. Just make sure you're using FormData when sending the data to the back-end, eg.:
function onSubmit(questionList) {
// Handle submit event.
const formData = new FormData()
questionList.forEach(question => {
formData.append(question.id, question.answer)
})
fetch(url, {
method: 'POST',
body: formData
})
}
@spinn Awesome thank you very much
@spinn Is this available via NPM?
@jimbrew Not yet, we're usually publishing one version per month, we want to make sure that when we publish it's as stable and bug-free as can be.
If you pull the latest Git version, you can run the following command to build the npm version:
npm run build:npm
Which you can then add as a local dependency to your project, eg.:
npm install ../vue-flow-form