Hello, I want to upload an image located in my loc...
# troubleshoot
a
Hello, I want to upload an image located in my local in the glossary term markdown document. However, as shown in the figure, datahub ui can't find the image though the path seems not wrong. I have no idea what to do.
b
generally, you're expected to upload the image to somewhere that is accessible from web browser, like git repo or some image uploader service
a
@better-orange-49102 Actually this local is not connected to web browser for security issue. Therefore, the only way is to save images in the local and upload them with path information. You mean, uploading images from local is impossible, right?
b
you can try something fancy like mounting the folder into the docker container for frontend, (though im not sure which is the correct path). i know there is a folder that contains the images /assets folder in frontend container
b
yup xL is right! you need to either use a publicly hosted image and set the image url to that (like https://images.pexels.com/photos/14894303/pexels-photo-14894303.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2) or you will need to mount it in your frontend container where react can access it. An example here would be anything in the
datahub-web-react/src/images
folder will be built and moved to
/assets/platforms/
so the local version of the datahub logo is at
assets/platforms/datahublogo.png
b
i just took a look inside the container - i think /assets folder is bundled in a jar somewhere? kinda hard to specify a mount point
If you build your own docker image, then you can put your images in the same folder as the platform images, then it will be in /assets. If you're trying to mount the image folder onto the default datahub frontend image by specifying a volume mount in docker-compose.yml, I'm not sure the correct path to mount it to (or whether it is possible at all - not too familiar with react)