more
This commit is contained in:
parent
7417a2c35c
commit
35ffaf3e48
1 changed files with 11 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue