This commit is contained in:
purifetchi 2025-01-13 00:17:12 +01:00
parent 7417a2c35c
commit 35ffaf3e48

View file

@ -9,11 +9,21 @@
const url = computed(() => {
return `http://localhost:5118/f/${props.item.filename}`;
})
const removeItem = async () => {
await fetch(`/api/file/delete?filename=${props.item.filename}`, {
method: 'GET',
credentials: 'include'
});
window.location.reload();
}
</script>
<template>
<div>{{ item.filename }} - {{ item.originalFilename }}</div>
<a :href="url">Download</a>
<a :href="url">Download</a><br/>
<a href="#" v-on:click.prevent="removeItem">Delete</a>
</template>
<style scoped>