[Vuejs]-File upload field not resetting after a successful submission in VueJS

0👍

To support v-model in components the component must implements a value prop and emit the input event.

It sound like the value prop is missing.

It kinda depends on the implementation of your custom-file-upload component, but here an example:

<template>
  <input @input="handleInput" :value="value" />
</template>

<script>
export default {
  prop: ['value'],
  methods: {
    handleInput (e) {
      this.$emit('input', e)
    }
  }
}
</script>

Leave a comment