Browse Source

auf $fetch umgestellt

pull/1/head
Georg Spar 1 year ago
parent
commit
f407fb81b2
  1. 7
      components/Photo.vue

7
components/Photo.vue

@ -75,9 +75,12 @@ const {data: photos } = await useFetch('http://ubodroid-2:8081/api/v1/pho');
const onAdvancedUpload = async (event) => { const onAdvancedUpload = async (event) => {
const files = event.files; 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", method: "POST",
body: files, body: fd,
}); });
if (imgUpload) { if (imgUpload) {
console.log(imgUpload); console.log(imgUpload);

Loading…
Cancel
Save