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>
Accessing the content of a file uploaded via FileUpload
-
- Posts: 560
- Joined: 23 Oct 2020, 09:28
Hi,
You can use methods of FileUpload component. An example https://codesandbox.io/s/t38ec with @upload event from the showcase.
Best,
You can use methods of FileUpload component. An example https://codesandbox.io/s/t38ec with @upload event from the showcase.
Best,
-
- Information
-
Who is online
Users browsing this forum: No registered users and 14 guests