0

I try like this : https://codepen.io/positivethinking639/pen/OJVRjGL?editors=1010

My code :

<v-form>
  <v-file-input multiple 
                v-model="documents"
                label="File input"></v-file-input>
  <v-btn color="success" @click="submit()">
    test
  </v-btn>
</v-form>

but it does not works

if I upload file and click button test, the formdata empty on the console

How can I solve this problem?

moses toh
  • 12,344
  • 71
  • 243
  • 443

2 Answers2

1

You can simple use the spread operator to view formdata. FormData is part of the XMLHttpRequest spec.

console.log(...formData);
Jeremy Walters
  • 2,081
  • 16
  • 28
0

You can't print formData directly on the console.

Try this.

// Display the key/value pairs
for (var pair of formData.entries()) {
    console.log(pair[0]+ ', ' + pair[1]); 
}

Codepen - https://codepen.io/positivethinking639/pen/OJVRjGL?editors=1010

Pratik Patel
  • 5,995
  • 1
  • 18
  • 39