Using CInputFile example with Vuejs

Hello there!

I’m using a CInputfile, perhaps, don’t understood your usage, because I can’t take de file into a json on data structure to send for POST to my API.

Example:

<CInputFile
  label="DOCUMENT"
  horizontal
  custom
/>

script

export default {
name: “PerfilPessoa”,
data() {
return {

//DOCUMENTO
historicdocument: {
document:
},
},
methods: {
saveDocument(){
this.$http
.post(
process.env.VUE_APP_API_BASE_URL + “document/save”,
this.historicdocument
)
.then((res) => res.json())
.then(
(payload) => {
this.success = true;
},
(err) => {
this.success = false;
}
);
},

}
/script

The problem is on saveDocument method. How I take de CInputfile bytearray to pass to my API?