Accessing the content of a file uploaded via FileUpload

Post Reply
erlebach
Posts: 4
Joined: 27 Jun 2021, 15:57

27 Jun 2021, 16:02

I am new to Vue and to PrimeVue. I am trying to upload a file (which worked), but I do not know how to access the contents of the uploaded file. So far, I have found a demo that demonstrates access to file content. Here is my code. Any help is appreciated. Thanks.
```
<template>
<div class="hello"></div>
<FileUpload name="demo[]" url="./" :maxFileSize="1000000" />
</template>

<script>
export default {
name: "HelloWorld",
props: {
msg: String,
},
data() {
return {
counter: 10,
js_file: "empty",
};
},
};
</script>

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

30 Jun 2021, 10:21

Hi,

You can use methods of FileUpload component. An example https://codesandbox.io/s/t38ec with @upload event from the showcase.

Best,

Post Reply

Return to “PrimeVue Theme Designer API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests