เพิ่ม่สง null file

This commit is contained in:
setthawutttty 2025-07-21 15:16:04 +07:00
parent 6f330cfd83
commit e22f130361
2 changed files with 10 additions and 4 deletions

View file

@ -46,7 +46,7 @@ async function createTransfer() {
const formData = new FormData();
formData.append("Organization", tranferOrg.value);
formData.append("Reason", noteReason.value);
formData.append("file", files.value);
formData.append("file", files.value ? files.value : null);
await http
.post(config.API.listtransfer(), formData)
.then((res) => {
@ -169,7 +169,10 @@ onMounted(() => {
></q-file>
</div>
<div class="col-12 row" v-if="routeName != 'addTransfer'">
<div
class="col-12 row"
v-if="routeName != 'addTransfer' && files && files.length > 0"
>
<q-card bordered flat class="full-width">
<div
class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"