on 06-02-2015 2:02 PM
$productCatalog=productCatalog $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default=Staged])[unique=true,default=$productCatalog:Staged] $media=@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator] $siteResource=file:D:\Test\images
$medias=medias(code, $catalogVersion)
INSERT_UPDATE Media;mediaFormat(qualifier);code[unique=true] ;@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator];mime[default='image/jpeg'];$catalogVersion;folder(qualifier);imageLoadType(code) ;160Wx160H ;160Wx160H_12347461002.jpg;$siteResource\12347461002.jpg;;;images;legacy
Above impex is failing due to path resolving problem. But, files are available in the same path. Please find the below error.
Caused by: de.hybris.platform.impex.jalo.ImpExException: Path 'file:D:\Test\images\12347461002.jpg' couldn't be resolved![HY--1] at de.hybris.platform.impex.jalo.media.DefaultMediaDataHandler.importData(DefaultMediaDataHandler.java:110)
Could you please provide your inputs on the same.
Thanks in Advance...
Hi Ravi,
You should use like this file:\\\C:\\Test\\images\\12347461002.jpg which should have double slash to insert. I tried below example and could upload media using the path.
$productCatalog=apparelProductCatalog
$productCatalogName=Apparel Product Catalog
$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
$media=@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator]
INSERT_UPDATE Media;mediaFormat(qualifier);code[unique=true];$media;mime[default='image/jpeg'];$catalogVersion;folder(qualifier)
;96Wx96H;test1;file:\\\C:\\Test\\images\\12347461002.jpg;;;images
Thanks,
Jayahar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry... it's not working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
Try following definition
$siteResource=file:\\\D:\Test\images
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
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.