fix broken upload button on migrations

This commit is contained in:
hay-kot
2021-04-18 17:43:32 -08:00
parent f48f55b6dc
commit fbf4282063
4 changed files with 6 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
:url="`/api/migrations/${folder}/upload`"
fileName="archive"
@uploaded="$emit('refresh')"
:post="true"
/>
</span>
</v-card-title>

View File

@@ -17,6 +17,7 @@
file-name="image"
:text-btn="false"
@uploaded="uploadImage"
:post="false"
/>
</v-card-title>
<v-card-text class="mt-n5">

View File

@@ -46,11 +46,12 @@ export default {
if (this.file != null) {
this.isSelecting = true;
if (this.post) {
if (!this.post) {
this.$emit(UPLOAD_EVENT, this.file);
this.isSelecting = false;
return;
}
let formData = new FormData();
formData.append(this.fileName, this.file);