forked from Ivasoft/geovisio-website
fix error upload img
This commit is contained in:
@@ -24,21 +24,21 @@ cache:
|
||||
|
||||
install:
|
||||
stage: Install
|
||||
image: node:21.7.2
|
||||
image: node:20.9.0
|
||||
script:
|
||||
- yarn install
|
||||
- ls node_modules/.bin/cypress
|
||||
|
||||
test:unit:
|
||||
stage: Test
|
||||
image: node:21.7.2
|
||||
image: node:20.9.0-alpine
|
||||
script:
|
||||
- yarn test:unit
|
||||
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
|
||||
|
||||
test:e2e:
|
||||
stage: Test
|
||||
image: node:21.7.2-alpine
|
||||
image: node:20.9.0-alpine
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
@@ -57,7 +57,7 @@ test:e2e:
|
||||
|
||||
deploy:
|
||||
stage: Deploy
|
||||
image: node:21.7.2
|
||||
image: node:20.9.0
|
||||
cache:
|
||||
paths:
|
||||
- node_modules
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#- Build image
|
||||
#-
|
||||
|
||||
FROM node:21.7.2-alpine AS build
|
||||
FROM node:20.9.0-alpine AS build
|
||||
|
||||
WORKDIR /opt/geovisio
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Docker-compose used in gitlab-ci to run a container having access to all the other containers
|
||||
services:
|
||||
web:
|
||||
image: node:21.7.2-alpine
|
||||
image: node:20.9.0-alpine
|
||||
volumes:
|
||||
- $PROJECT_DIR:/src
|
||||
working_dir: /src
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "geovisio-website",
|
||||
"version": "2.6.1",
|
||||
"engines": {
|
||||
"node": "21"
|
||||
"node": "20.9.0"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
"cancel_message": "⚠️ Please note, the download will be interrupted if you validate and the sequence will be deleted.",
|
||||
"sequence_title": "Sequence ",
|
||||
"error_upload": "Sequence creation error",
|
||||
"error_upload_img": "An error has occurred",
|
||||
"import": "Uploads",
|
||||
"upload_pending": "Upload in progress…",
|
||||
"images_count_text": "Pictures uploaded",
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
"cancel_message": "⚠️ Attention, le téléchargement sera interrompu si vous validez et la séquence sera supprimée.",
|
||||
"sequence_title": "Séquence du ",
|
||||
"error_upload": "Erreur de création de la séquence",
|
||||
"error_upload_img": "Une erreur est survenue",
|
||||
"import": "Imports",
|
||||
"upload_pending": "Transfert en cours…",
|
||||
"images_count_text": "Images chargées",
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
"cancel_message": "⚠️ Felhívjuk figyelmét, hogy a letöltés megszakad, ha érvényesíti, és a sorozat törlődik.",
|
||||
"sequence_title": "Sorozat ",
|
||||
"error_upload": "Sorozat létrehozási hiba",
|
||||
"error_upload_img": "Hiba történt",
|
||||
"import": "Feltöltések",
|
||||
"upload_pending": "Feltöltés folyamatban…",
|
||||
"images_count_text": "Feltöltött képek",
|
||||
|
||||
@@ -315,6 +315,9 @@ async function uploadPicture(): Promise<void> {
|
||||
]
|
||||
calcPercentage()
|
||||
} catch (err: any) {
|
||||
if (
|
||||
err.response.data.message === 'Impossible to parse picture metadata'
|
||||
) {
|
||||
picturesUploadingSize.value = picturesUploadingSize.value + el.size
|
||||
const picturesOnError = {
|
||||
message: err.response.data.message,
|
||||
@@ -326,6 +329,9 @@ async function uploadPicture(): Promise<void> {
|
||||
picturesOnError
|
||||
]
|
||||
calcPercentage()
|
||||
} else {
|
||||
uploadError.value = t('pages.upload.error_upload_img')
|
||||
}
|
||||
}
|
||||
}
|
||||
pictures.value = []
|
||||
|
||||
Reference in New Issue
Block a user