fix(notification+vlog upload)
Some checks failed
Deploy to Development / build-and-deploy (push) Failing after 46s
Deploy to Production / build-and-deploy (push) Successful in 1m47s

This commit is contained in:
EvanChal
2026-01-27 02:39:51 +01:00
parent 658b7a9dda
commit f33dfd5ab7
20 changed files with 499 additions and 262 deletions

View File

@@ -289,7 +289,7 @@ import { useRoute, useRouter } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import { useToast } from 'vue-toastification'
import axios from '@/utils/axios'
import { getMediaUrl } from '@/utils/axios'
import { getMediaUrl, uploadFormData } from '@/utils/axios'
import { formatRelativeDateInFrenchTimezone } from '@/utils/dateUtils'
import {
Plus,
@@ -465,9 +465,8 @@ async function handleImageChange(event) {
const formData = new FormData()
formData.append('file', file)
const response = await axios.post('/api/posts/upload-image', formData)
newPost.value.image_url = response.data.image_url
const data = await uploadFormData('/api/posts/upload-image', formData)
newPost.value.image_url = data.image_url
} catch (error) {
toast.error('Erreur lors de l\'upload de l\'image')
}