FileupLoad capture event or response api not work #3391
Unanswered
ayepes2003
asked this question in
PrimeVue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thanks all for reader my emaill.
i need you help
the process send api url perfect. running
the backEnd response json
process read file and error process or success process
not execute event onUploadFile.
const onUploadFile= async (event) => {
await console.log(event.xhr.response);
};
<FileUpload
name="order_file"
url="http://backend.test/api/v1/quotations/upload_quoation"
@Upload="onUploadFile()"
:multiple="false"
accept=".xls,.xlsx,.xlsm,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
:maxFileSize="1000000"
@select="onSelectedFiles"
customUpload
>
<template #header="{ chooseCallback, uploadCallback, clearCallback, files }">
<Button @click="chooseCallback()" icon="pi pi-images" rounded outlined>
<Button @click="uploadEvent(uploadCallback)" icon="pi pi-cloud-upload" rounded outlined severity="success" :disabled="!files || files.length === 0">
<Button @click="clearCallback()" icon="pi pi-times" rounded outlined severity="danger" :disabled="!files || files.length === 0">
{{ totalSize }}B / 1Mb
<template #content="{ files, uploadedFiles, removeUploadedFileCallback, removeFileCallback }">
<template #empty>
Drag and drop files to here to upload.
Beta Was this translation helpful? Give feedback.
All reactions