on 2023 Aug 09 9:35 PM
Hello.
My question is regarding the placement of media files obtained from CCV2 media backup blobs on a local development system.
I am running a local installation of SAP Commerce Cloud 2205 on a Windows 10 machine. Recently I obtained a database .bacpac file (Azure SQL) of our Production CCV2 instance along with blob folders of the associated media folders.
product1.jpgWhen I download the media blobs, I copy them to my local installation media folder /hybris/data/media/sys_master and end up with folders like backoffice, backofficeconfiguration, …, images, and root. After starting up my server, synchronizing the product and content catalogs, and doing SOLR indexing, the product images do not display in my storefront.
The product images are present in the /images directory path as identified in the media record.
· Folder is “images”
· Location is “h04/hfb/….”
I have found that if I copy the contents of the /images folder up to the parent sys_master folder then the product images will display in the storefront. There are also some product images stored in the /root folder and I must copy from /root to the parent sys_master folder for them to display as well.
Can anyone help me understand why I must move the product images this way rather than retain them in their original subfolder(s)?
Request clarification before answering.
That is because in cloud storage, every folder corresponds to a different container, unless you define a container for the folder with media.folder.<folder_name>.containerAddress property. Thus, for example images folder in commerce looks for sys-master-images container, and the location in DB is points the location under this container. E.g. a media with images folder and h04/hfb/…. location should be found under sys-master-images container's h04/hfb/…. location
In local storage strategy, location points to relative directory from <HYBRIS_DATA_DIR> (e.g. /hybris/data/media/sys_master). The location for the media under images folder should be something like images/h04/hfb/..
You can observe this behavior by uploading the same file under the same folder on your local and cloud.
If you want to make it work without changing media locations, you should update location value of medias by appending folder name. E.g. location of the media should be updated to images/h04/hfb/.. from h04/hfb/..
This can be done with an SQL query. You should exclude root folder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.