Fix double uploading
This commit is contained in:
parent
6071b217bc
commit
6fc9f64583
|
@ -583,13 +583,7 @@ const labels = computed(() => ({
|
||||||
ref="upload"
|
ref="upload"
|
||||||
v-model="files"
|
v-model="files"
|
||||||
:class="['ui', 'icon', 'basic', 'button', 'channels', {hidden: step === 3}]"
|
:class="['ui', 'icon', 'basic', 'button', 'channels', {hidden: step === 3}]"
|
||||||
:post-action="$store.getters['instance/absoluteUrl']('/api/v1/uploads/')"
|
|
||||||
:multiple="true"
|
|
||||||
:data="baseImportMetadata"
|
:data="baseImportMetadata"
|
||||||
:drop="true"
|
|
||||||
:extensions="$store.state.ui.supportedExtensions"
|
|
||||||
name="audio_file"
|
|
||||||
:thread="1"
|
|
||||||
@input-file="beforeFileUpload"
|
@input-file="beforeFileUpload"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -263,7 +263,7 @@ const inputFile = (newFile: VueUploadItem) => {
|
||||||
if (remainingSpace.value < (newFile.size ?? Infinity) / 1e6) {
|
if (remainingSpace.value < (newFile.size ?? Infinity) / 1e6) {
|
||||||
newFile.error = 'denied'
|
newFile.error = 'denied'
|
||||||
} else {
|
} else {
|
||||||
upload.value.active = true
|
newFile.active = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,13 +386,7 @@ useEventListener(window, 'beforeunload', (event) => {
|
||||||
ref="upload"
|
ref="upload"
|
||||||
v-model="files"
|
v-model="files"
|
||||||
:class="['ui', 'icon', 'basic', 'button']"
|
:class="['ui', 'icon', 'basic', 'button']"
|
||||||
:post-action="$store.getters['instance/absoluteUrl']('/api/v1/uploads/')"
|
|
||||||
:multiple="true"
|
|
||||||
:data="uploadData"
|
:data="uploadData"
|
||||||
:drop="true"
|
|
||||||
:extensions="supportedExtensions"
|
|
||||||
name="audio_file"
|
|
||||||
:thread="1"
|
|
||||||
@input-file="inputFile"
|
@input-file="inputFile"
|
||||||
>
|
>
|
||||||
<i class="upload icon" />
|
<i class="upload icon" />
|
||||||
|
|
|
@ -83,17 +83,17 @@ export default { inheritAttrs: false }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- <component
|
|
||||||
ref="fileUpload"
|
|
||||||
:is="FileUpload"
|
|
||||||
>
|
|
||||||
<slot />
|
|
||||||
</component> -->
|
|
||||||
<file-upload
|
<file-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
:post-action="$store.getters['instance/absoluteUrl']('/api/v1/uploads/')"
|
||||||
|
:multiple="true"
|
||||||
|
:thread="1"
|
||||||
:custom-action="uploadAction"
|
:custom-action="uploadAction"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
|
:extensions="$store.state.ui.supportedExtensions"
|
||||||
|
:drop="true"
|
||||||
|
name="audio_file"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</file-upload>
|
</file-upload>
|
||||||
|
|
Loading…
Reference in New Issue