diff --git a/components/Photo.vue b/components/Photo.vue index c49bde4..01817a8 100644 --- a/components/Photo.vue +++ b/components/Photo.vue @@ -75,9 +75,12 @@ const {data: photos } = await useFetch('http://ubodroid-2:8081/api/v1/pho'); const onAdvancedUpload = async (event) => { const files = event.files; - const imgUpload = await useFetch("http://ubodroid-2:8081/api/v1/upload", { + let fd = new FormData(); + fd.append('files', files); + console.log('fd = ', fd); + const imgUpload = await $fetch("http://ubodroid-2:8081/api/v1/upload", { method: "POST", - body: files, + body: fd, }); if (imgUpload) { console.log(imgUpload);