diff --git a/README.md b/README.md index 152a658..10295a7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ -->
Current Version - 2022.04.26
+Current Version - 2022.07.06
A self-hosted vehicle expense tracking system with support for multiple users. diff --git a/ui/src/router/views/settings.vue b/ui/src/router/views/settings.vue index eb3db3f..6f487b8 100644 --- a/ui/src/router/views/settings.vue +++ b/ui/src/router/views/settings.vue @@ -203,7 +203,7 @@ export default {
| Current Version | -2022.04.26 | +2022.07.06 |
| Website | diff --git a/ui/src/router/views/vehicle.vue b/ui/src/router/views/vehicle.vue index 2c1bdfc..101b2fc 100644 --- a/ui/src/router/views/vehicle.vue +++ b/ui/src/router/views/vehicle.vue @@ -199,14 +199,21 @@ export default { return } this.tryingToUpload = true + const formData = new FormData() formData.append('file', this.file, this.file.name) formData.append('title', this.title) - axios - .post(`/api/vehicles/${this.vehicle.id}/attachments`, formData) + // const config = { headers: { 'Content-Type': 'multipart/form-data; boundary=' + formData._boundary } } + fetch(`/api/vehicles/${this.vehicle.id}/attachments`, { + method: 'POST', + body: formData, + headers: { + Authorization: this.currentUser.token, + }, + }) .then((data) => { this.$buefy.toast.open({ - message: 'Quick Entry Created Successfully', + message: 'File uploaded Successfully', type: 'is-success', duration: 3000, })