Commit d25edad2 authored by PDuarte's avatar PDuarte

* multi uploads fix

* imagery url
parent 3a0bca18
...@@ -2,4 +2,4 @@ SKIP_PREFLIGHT_CHECK=true ...@@ -2,4 +2,4 @@ SKIP_PREFLIGHT_CHECK=true
REACT_APP_BASENAME=/cms REACT_APP_BASENAME=/cms
REACT_APP_API="http://192.168.99.100:8001/cms" REACT_APP_API="http://192.168.99.100:8001/cms"
REACT_APP_API1="http://134.209.18.22/cmsapi" REACT_APP_API1="http://134.209.18.22/cmsapi"
IMAGERY=""http://134.209.18.22/imagery" REACT_APP_IMAGERY="http://192.168.99.100:8001/imagery"
...@@ -19,7 +19,7 @@ const BlocoImage = ({title, img, handelImageChange}) => { ...@@ -19,7 +19,7 @@ const BlocoImage = ({title, img, handelImageChange}) => {
useEffect(() => { useEffect(() => {
if (img !== null && img !== undefined) { if (img !== null && img !== undefined) {
return setImgd(`${process.env.IMAGERY}/${img}`) return setImgd(`${process.env.REACT_APP_IMAGERY}/${img}`)
} }
}, [img]) }, [img])
......
...@@ -191,13 +191,12 @@ const handleError = (text) => { ...@@ -191,13 +191,12 @@ const handleError = (text) => {
}, },
handleImageryChange = (prop, file, lang) => { handleImageryChange = (prop, file, lang) => {
let newUpload = uploadFiles.filter(elm => elm.type !== prop) let newUpload = uploadFiles.filter(elm => elm.type !== prop || elm.langcode.langcode !== lang.langcode)
newUpload = newUpload.concat({ newUpload = newUpload.concat({
type: prop, type: prop,
langcode: lang, langcode: lang,
obj: file obj: file
}) })
setUploadFile(newUpload) setUploadFile(newUpload)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment